<?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: &amp;quot;Return&amp;quot; in a shell script. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-return-quot-in-a-shell-script/m-p/2654981#M46991</link>
    <description>The answer depends entirely on the command that requires the two returns.  If the program understands stdin, then you could redirect stdin to be two carriage returns.  If the process needs yes or no or something else, you can redirect the output of yes (hint: man yes) to the program.&lt;BR /&gt;&lt;BR /&gt;If the program does not understand redirected stdin, then the freeware program expect may be a solution. Don't try to test the command in the script until you get it to work from the command line.  And be sure that if the program requires a special environment, it must be set in the script (cron has almost nothing in the environment).</description>
    <pubDate>Wed, 30 Jan 2002 02:02:41 GMT</pubDate>
    <dc:creator>Bill Hassell</dc:creator>
    <dc:date>2002-01-30T02:02:41Z</dc:date>
    <item>
      <title>"Return" in a shell script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-return-quot-in-a-shell-script/m-p/2654972#M46982</link>
      <description>How do I implement a return in a shell script? I want this to happen automatically. For example, I execute a command and want 2 "returns" to happen.....</description>
      <pubDate>Tue, 29 Jan 2002 20:29:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-return-quot-in-a-shell-script/m-p/2654972#M46982</guid>
      <dc:creator>Mike_21</dc:creator>
      <dc:date>2002-01-29T20:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: "Return" in a shell script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-return-quot-in-a-shell-script/m-p/2654973#M46983</link>
      <description>Hi Mike:&lt;BR /&gt;&lt;BR /&gt;Your question is very unclear. Do you want to exit with a given value (e.g) exit 2; do you want to print values to stdout?; or do you want to echo Carriage Returns via echo "\r\r\c"? &lt;BR /&gt;</description>
      <pubDate>Tue, 29 Jan 2002 20:33:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-return-quot-in-a-shell-script/m-p/2654973#M46983</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-01-29T20:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: "Return" in a shell script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-return-quot-in-a-shell-script/m-p/2654974#M46984</link>
      <description>Ok, for example I have a command the requires you to hit the enter key. I am planning to cron the job, so how do I get the script to do this automatically???</description>
      <pubDate>Tue, 29 Jan 2002 20:37:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-return-quot-in-a-shell-script/m-p/2654974#M46984</guid>
      <dc:creator>Mike_21</dc:creator>
      <dc:date>2002-01-29T20:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: "Return" in a shell script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-return-quot-in-a-shell-script/m-p/2654975#M46985</link>
      <description>Hi Mike:&lt;BR /&gt;&lt;BR /&gt;Do you want/mean "return" as in linefeed?...then:&lt;BR /&gt;&lt;BR /&gt;# echo "bye!\n"&lt;BR /&gt;&lt;BR /&gt;Or do you mean 'break' one or more time from a loop control?&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 29 Jan 2002 20:37:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-return-quot-in-a-shell-script/m-p/2654975#M46985</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-01-29T20:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: "Return" in a shell script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-return-quot-in-a-shell-script/m-p/2654976#M46986</link>
      <description>Hi Mike:&lt;BR /&gt;&lt;BR /&gt;...like this:&lt;BR /&gt;&lt;BR /&gt;# echo "Press ENTER when ready!"&lt;BR /&gt;# read BITBUCKET&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 29 Jan 2002 20:40:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-return-quot-in-a-shell-script/m-p/2654976#M46986</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-01-29T20:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: "Return" in a shell script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-return-quot-in-a-shell-script/m-p/2654977#M46987</link>
      <description>he..he.. I am making this confusing......&lt;BR /&gt;&lt;BR /&gt;I mean at a certain point in this script, the script is waiting for the user to hit the "enter" key, I want this action to be aoutmatic!</description>
      <pubDate>Tue, 29 Jan 2002 20:41:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-return-quot-in-a-shell-script/m-p/2654977#M46987</guid>
      <dc:creator>Mike_21</dc:creator>
      <dc:date>2002-01-29T20:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: "Return" in a shell script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-return-quot-in-a-shell-script/m-p/2654978#M46988</link>
      <description>Hi agian Mike:&lt;BR /&gt;&lt;BR /&gt;Plan B. Look into a utility called 'Expect'. You can get it from any of the HP-UX Porting Centre's. With Expect, you can specify patterns to look for and then the appropriate response. If all you need are a couple of LF's CR's then simply echo will work just fine.&lt;BR /&gt;&lt;BR /&gt;Clay</description>
      <pubDate>Tue, 29 Jan 2002 20:49:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-return-quot-in-a-shell-script/m-p/2654978#M46988</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-01-29T20:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: "Return" in a shell script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-return-quot-in-a-shell-script/m-p/2654979#M46989</link>
      <description>Hi Mike,&lt;BR /&gt;&lt;BR /&gt;If you're certain you want to always answer the replies with &lt;CR&gt;:&lt;BR /&gt;&lt;BR /&gt;process &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;&lt;BR /&gt;&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;Hopefully this show up as 2 blank lines between the start of input redirection (&amp;lt;&lt;EOF&gt;&lt;/EOF&gt;&lt;BR /&gt;Put nothing else on between these 2 lines.  The ending EOF needs to start in column 1.&lt;BR /&gt;&lt;BR /&gt;Darrell&lt;/CR&gt;</description>
      <pubDate>Tue, 29 Jan 2002 21:15:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-return-quot-in-a-shell-script/m-p/2654979#M46989</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2002-01-29T21:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: "Return" in a shell script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-return-quot-in-a-shell-script/m-p/2654980#M46990</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Maybe you can try this:&lt;BR /&gt;&lt;BR /&gt;echo "Press enter to continue..."&lt;BR /&gt;ans=`line -t 5`&lt;BR /&gt;&lt;BR /&gt;It will continue after 5 seconds without press the enter key.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;Kenny.</description>
      <pubDate>Wed, 30 Jan 2002 01:47:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-return-quot-in-a-shell-script/m-p/2654980#M46990</guid>
      <dc:creator>Kenny Chau</dc:creator>
      <dc:date>2002-01-30T01:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: "Return" in a shell script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-return-quot-in-a-shell-script/m-p/2654981#M46991</link>
      <description>The answer depends entirely on the command that requires the two returns.  If the program understands stdin, then you could redirect stdin to be two carriage returns.  If the process needs yes or no or something else, you can redirect the output of yes (hint: man yes) to the program.&lt;BR /&gt;&lt;BR /&gt;If the program does not understand redirected stdin, then the freeware program expect may be a solution. Don't try to test the command in the script until you get it to work from the command line.  And be sure that if the program requires a special environment, it must be set in the script (cron has almost nothing in the environment).</description>
      <pubDate>Wed, 30 Jan 2002 02:02:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-return-quot-in-a-shell-script/m-p/2654981#M46991</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2002-01-30T02:02:41Z</dc:date>
    </item>
  </channel>
</rss>

