<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: [ How to make script to read inputs from a file ] in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640847#M105151</link>
    <description>Yes, You can do that, shell reads line by line. &lt;BR /&gt;&lt;BR /&gt;-Arun</description>
    <pubDate>Mon, 03 Oct 2005 23:34:14 GMT</pubDate>
    <dc:creator>Arunvijai_4</dc:creator>
    <dc:date>2005-10-03T23:34:14Z</dc:date>
    <item>
      <title>[ How to make script to read inputs from a file ]</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640843#M105147</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;I have script which has no support for inputs from a file. But i use script with same values all the time. &lt;BR /&gt;Hence i would like to put all my answers for all queries of script in a file and want to supply it.&lt;BR /&gt;&lt;BR /&gt;What is the best way to do this, with minimum changes. I would like to know is it possible to close file handle and duplicate stdin for my file.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Madhava</description>
      <pubDate>Mon, 03 Oct 2005 23:05:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640843#M105147</guid>
      <dc:creator>madhavabk</dc:creator>
      <dc:date>2005-10-03T23:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: [ How to make script to read inputs from a file ]</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640844#M105148</link>
      <description>Couldn't be simpler:&lt;BR /&gt;&lt;BR /&gt;myscript.sh &amp;lt; myinputfile.txt</description>
      <pubDate>Mon, 03 Oct 2005 23:14:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640844#M105148</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-10-03T23:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: [ How to make script to read inputs from a file ]</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640845#M105149</link>
      <description>Use while loop&lt;BR /&gt;&lt;BR /&gt;while read i&lt;BR /&gt;do&lt;BR /&gt;myscript $i&lt;BR /&gt;done&lt;MYINPUTFILE&gt;&lt;/MYINPUTFILE&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Oct 2005 23:17:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640845#M105149</guid>
      <dc:creator>Rajeev  Shukla</dc:creator>
      <dc:date>2005-10-03T23:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: [ How to make script to read inputs from a file ]</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640846#M105150</link>
      <description>Hi Clay Stephenson,&lt;BR /&gt;&lt;BR /&gt;If i redirect input from a file will the script understand the format or we need to take care of checking each entry?&lt;BR /&gt;&lt;BR /&gt;My doubt is if i put all responses on seperate lines will script parses it correctly and gives inputs to queries in script.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Madhava&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Oct 2005 23:27:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640846#M105150</guid>
      <dc:creator>madhavabk</dc:creator>
      <dc:date>2005-10-03T23:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: [ How to make script to read inputs from a file ]</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640847#M105151</link>
      <description>Yes, You can do that, shell reads line by line. &lt;BR /&gt;&lt;BR /&gt;-Arun</description>
      <pubDate>Mon, 03 Oct 2005 23:34:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640847#M105151</guid>
      <dc:creator>Arunvijai_4</dc:creator>
      <dc:date>2005-10-03T23:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: [ How to make script to read inputs from a file ]</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640848#M105152</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am getting problem with script during only password reading portion.&lt;BR /&gt;&lt;BR /&gt;Other than script is able to read line by line for each input required.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Madhava&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Oct 2005 00:12:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640848#M105152</guid>
      <dc:creator>madhavabk</dc:creator>
      <dc:date>2005-10-04T00:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: [ How to make script to read inputs from a file ]</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640849#M105153</link>
      <description>If possible, can you post your script ? We shall take a look at it and modify .. What kind of problem you are facing in password reading portion ? &lt;BR /&gt;&lt;BR /&gt;-Arun &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Oct 2005 00:26:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640849#M105153</guid>
      <dc:creator>Arunvijai_4</dc:creator>
      <dc:date>2005-10-04T00:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: [ How to make script to read inputs from a file ]</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640850#M105154</link>
      <description>what password it asks?? Is that system related?? You may use expect tool for it.</description>
      <pubDate>Tue, 04 Oct 2005 00:28:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640850#M105154</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-10-04T00:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: [ How to make script to read inputs from a file ]</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640851#M105155</link>
      <description>A simplest way is as,&lt;BR /&gt;&lt;BR /&gt;--- configuration.ksh ----&lt;BR /&gt;name=madhavbk&lt;BR /&gt;day="Oct 5"&lt;BR /&gt;&lt;BR /&gt;--- script.ksh ---&lt;BR /&gt;. ./configuration.ksh&lt;BR /&gt;echo $name&lt;BR /&gt;echo $day&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;. &lt;FILE name="" with="" relative="" path=""&gt;&lt;BR /&gt;&lt;BR /&gt;It is like a header file inclusion in ksh scripting.&lt;BR /&gt;&lt;BR /&gt;hth.&lt;BR /&gt;&lt;/FILE&gt;</description>
      <pubDate>Tue, 04 Oct 2005 00:40:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640851#M105155</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-10-04T00:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: [ How to make script to read inputs from a file ]</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640852#M105156</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;For all password requests when there is echo off for stty script is not reading password from file.&lt;BR /&gt;All other entries it is taking correctly.&lt;BR /&gt;&lt;BR /&gt;Any clues.&lt;BR /&gt;&lt;BR /&gt;Following is the error message.&lt;BR /&gt;&lt;BR /&gt;stty: : Not a typewriter&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Madhava&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Oct 2005 06:07:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640852#M105156</guid>
      <dc:creator>madhavabk</dc:creator>
      <dc:date>2005-10-04T06:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: [ How to make script to read inputs from a file ]</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640853#M105157</link>
      <description>Refer this:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=891850" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=891850&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Tue, 04 Oct 2005 06:10:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640853#M105157</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-10-04T06:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: [ How to make script to read inputs from a file ]</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640854#M105158</link>
      <description>Can you check this doc, &lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B2355-90046/ch21s04.html" target="_blank"&gt;http://docs.hp.com/en/B2355-90046/ch21s04.html&lt;/A&gt;&lt;BR /&gt;[Shells: User's Guide &amp;gt;  Chapter 21. Basic Shell Programming  Data Input and Output]&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=944865" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=944865&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=35433" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=35433&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;-Arun</description>
      <pubDate>Tue, 04 Oct 2005 06:11:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640854#M105158</guid>
      <dc:creator>Arunvijai_4</dc:creator>
      <dc:date>2005-10-04T06:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: [ How to make script to read inputs from a file ]</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640855#M105159</link>
      <description>Are you running this script in batch mode with /etc/profile or .profile. So that it will make that. Try to add that script with profile itself. Refer more,&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=72142" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=72142&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Tue, 04 Oct 2005 06:12:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640855#M105159</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-10-04T06:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: [ How to make script to read inputs from a file ]</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640856#M105160</link>
      <description>Just before stty -echo statement, you may put this code and try.&lt;BR /&gt;&lt;BR /&gt;The error is because, it expacts ainteractive terminal and it does not get one.&lt;BR /&gt;&lt;BR /&gt;if tty -s&lt;BR /&gt;then&lt;BR /&gt;INTERACTIVE=/sbin/true&lt;BR /&gt;else&lt;BR /&gt;INTERACTIVE=/sbin/false&lt;BR /&gt;fi&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Oct 2005 06:21:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640856#M105160</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-10-04T06:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: [ How to make script to read inputs from a file ]</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640857#M105161</link>
      <description>It's those little details you fail to mention...&lt;BR /&gt;&lt;BR /&gt;Reading passwords really has nothing to do with echo off or on. It depends on which passwords you are trying to read and what routines are actually being used but in almost all cases, stdin is not the source of input for the password read. Those are almost always read using another file descriptor. In general, you must use a tool like expect (which does handle multiple file descriptors) to process complicated password entry. You can get expect from any of the HP-UX Porting Centre's.&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Oct 2005 09:30:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-make-script-to-read-inputs-from-a-file/m-p/3640857#M105161</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-10-04T09:30:47Z</dc:date>
    </item>
  </channel>
</rss>

