<?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: scripting in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/scripting/m-p/4111455#M30945</link>
    <description>I just tested a script like this:&lt;BR /&gt;&lt;BR /&gt;echo "Enter the value for HELLO"&lt;BR /&gt;read HELLO&lt;BR /&gt;if [ -z "$HELLO" ]&lt;BR /&gt;then&lt;BR /&gt;  HELLO=default&lt;BR /&gt;fi&lt;BR /&gt;echo $HELLO&lt;BR /&gt;&lt;BR /&gt;echo "Enter the value for GOODBYE"&lt;BR /&gt;read GOODBYE&lt;BR /&gt;if [ -z "$GOODBYE" ]&lt;BR /&gt;then&lt;BR /&gt;  GOODBYE=default&lt;BR /&gt;fi&lt;BR /&gt;echo $GOODBYE&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Running in this way:&lt;BR /&gt;&lt;BR /&gt;touch answer&lt;BR /&gt;./script &amp;lt; answer&lt;BR /&gt;&lt;BR /&gt;It accepts all the default values.</description>
    <pubDate>Tue, 04 Dec 2007 17:59:22 GMT</pubDate>
    <dc:creator>Ivan Ferreira</dc:creator>
    <dc:date>2007-12-04T17:59:22Z</dc:date>
    <item>
      <title>scripting</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripting/m-p/4111452#M30942</link>
      <description>Hi everyone,&lt;BR /&gt;&lt;BR /&gt;Need a help on a script. I have explorer script which i need to automate. The script basically collects information about server hardware software etc.&lt;BR /&gt;I need to provide inputs to the script (need to automate this with another script). The script needs just an "enter" (to accept the default) for all the Questions that it asks. Is there a way that i can provide the input ("enter" i.e echo -e "/r") to the script in a loop etc whenever it asks for input.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;SaC&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Dec 2007 16:58:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripting/m-p/4111452#M30942</guid>
      <dc:creator>Sac_3</dc:creator>
      <dc:date>2007-12-04T16:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: scripting</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripting/m-p/4111453#M30943</link>
      <description>if I understand your question correctly&lt;BR /&gt;&lt;BR /&gt;you have a interactive script ( say explorer.sh) which requires some input at runtime.&lt;BR /&gt;&lt;BR /&gt;you want a way to run this script and leave it unattended  and also want the input to be give automatically.&lt;BR /&gt;&lt;BR /&gt;as the default value is taken when enter is pressed.&lt;BR /&gt;&lt;BR /&gt;create a file which has as many lines as there are inpupts/questions in script. say the name of the file is default_input.txt&lt;BR /&gt;&lt;BR /&gt;exceute your script in while loop as &lt;BR /&gt;&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;explorer.sh &amp;lt; default_input.txt&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Thanks &lt;BR /&gt;Sri&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Dec 2007 17:32:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripting/m-p/4111453#M30943</guid>
      <dc:creator>Srimalik</dc:creator>
      <dc:date>2007-12-04T17:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: scripting</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripting/m-p/4111454#M30944</link>
      <description>What u understand is correct. Thx for the reply Sri. Im facing an issue while executing the logic that u gave i.e the script shud take input only when it requires/asks, but using this logic it is taking input every time.&lt;BR /&gt;&lt;BR /&gt;So my requirement is, when the script needs input it takes input from input.txt and finally when done shud exit.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Dec 2007 17:56:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripting/m-p/4111454#M30944</guid>
      <dc:creator>Sac_3</dc:creator>
      <dc:date>2007-12-04T17:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: scripting</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripting/m-p/4111455#M30945</link>
      <description>I just tested a script like this:&lt;BR /&gt;&lt;BR /&gt;echo "Enter the value for HELLO"&lt;BR /&gt;read HELLO&lt;BR /&gt;if [ -z "$HELLO" ]&lt;BR /&gt;then&lt;BR /&gt;  HELLO=default&lt;BR /&gt;fi&lt;BR /&gt;echo $HELLO&lt;BR /&gt;&lt;BR /&gt;echo "Enter the value for GOODBYE"&lt;BR /&gt;read GOODBYE&lt;BR /&gt;if [ -z "$GOODBYE" ]&lt;BR /&gt;then&lt;BR /&gt;  GOODBYE=default&lt;BR /&gt;fi&lt;BR /&gt;echo $GOODBYE&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Running in this way:&lt;BR /&gt;&lt;BR /&gt;touch answer&lt;BR /&gt;./script &amp;lt; answer&lt;BR /&gt;&lt;BR /&gt;It accepts all the default values.</description>
      <pubDate>Tue, 04 Dec 2007 17:59:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripting/m-p/4111455#M30945</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2007-12-04T17:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: scripting</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripting/m-p/4111456#M30946</link>
      <description>U cracked it!! Thx Ivan!!</description>
      <pubDate>Tue, 04 Dec 2007 18:23:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripting/m-p/4111456#M30946</guid>
      <dc:creator>Sac_3</dc:creator>
      <dc:date>2007-12-04T18:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: scripting</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripting/m-p/4111457#M30947</link>
      <description>I suggested a similar solution as Ivan.&lt;BR /&gt;&lt;BR /&gt;Seems that I was not able to convay it properly. sorry for my poor english. &lt;BR /&gt;&lt;BR /&gt;neways the problem is solved :).</description>
      <pubDate>Wed, 05 Dec 2007 02:25:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripting/m-p/4111457#M30947</guid>
      <dc:creator>Srimalik</dc:creator>
      <dc:date>2007-12-05T02:25:33Z</dc:date>
    </item>
  </channel>
</rss>

