<?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: called a script within a script that requires a response in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/called-a-script-within-a-script-that-requires-a-response/m-p/5027438#M97505</link>
    <description>If you can anticipate all the responses, then all you need to do is create a file and redirect stdin or use a pipe.&lt;BR /&gt;&lt;BR /&gt;echo "Y" | myscript.sh&lt;BR /&gt;&lt;BR /&gt;Now when faced with more complicated choices (ie the questions change with varying conditions), that becomes the role of the expect utility.&lt;BR /&gt;&lt;A href="http://hpux.its.tudelft.nl/hppd/hpux/Tcl/expect-5.43/" target="_blank"&gt;http://hpux.its.tudelft.nl/hppd/hpux/Tcl/expect-5.43/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;But for your simple case, reading from a file or pipe should suffice.&lt;BR /&gt;</description>
    <pubDate>Thu, 08 Feb 2007 14:52:43 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2007-02-08T14:52:43Z</dc:date>
    <item>
      <title>called a script within a script that requires a response</title>
      <link>https://community.hpe.com/t5/operating-system-linux/called-a-script-within-a-script-that-requires-a-response/m-p/5027433#M97500</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I'm calling a script in my scipt and the script I called is asking me "Are you sure y/n". In my script since I don't have to manually intervene, I want to automatically take "Y" for my answer. How can I put "Y" on my script?&lt;BR /&gt;&lt;BR /&gt;thanks,&lt;BR /&gt;f. halili</description>
      <pubDate>Thu, 08 Feb 2007 14:41:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/called-a-script-within-a-script-that-requires-a-response/m-p/5027433#M97500</guid>
      <dc:creator>f. halili</dc:creator>
      <dc:date>2007-02-08T14:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: called a script within a script that requires a response</title>
      <link>https://community.hpe.com/t5/operating-system-linux/called-a-script-within-a-script-that-requires-a-response/m-p/5027434#M97501</link>
      <description>say your calling script "two", do this:&lt;BR /&gt;&lt;BR /&gt;two &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;Y&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;man sh-posix and look at "hear" documents.  Note, the "EOF" can be anything you want, but *must* be left-justified</description>
      <pubDate>Thu, 08 Feb 2007 14:48:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/called-a-script-within-a-script-that-requires-a-response/m-p/5027434#M97501</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2007-02-08T14:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: called a script within a script that requires a response</title>
      <link>https://community.hpe.com/t5/operating-system-linux/called-a-script-within-a-script-that-requires-a-response/m-p/5027435#M97502</link>
      <description>Something like this in script1:&lt;BR /&gt;&lt;BR /&gt;/path/to/script2 &amp;lt;&amp;lt; EOF&lt;BR /&gt;Y&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please note that the EOF MUST start at the beginning of the line, UNLESS you do '&amp;lt;&amp;lt;-' then you can TAB over, NOT SPACE, to position EOF.</description>
      <pubDate>Thu, 08 Feb 2007 14:48:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/called-a-script-within-a-script-that-requires-a-response/m-p/5027435#M97502</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2007-02-08T14:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: called a script within a script that requires a response</title>
      <link>https://community.hpe.com/t5/operating-system-linux/called-a-script-within-a-script-that-requires-a-response/m-p/5027436#M97503</link>
      <description>note - I said "hear" docs...should be "here" docs...</description>
      <pubDate>Thu, 08 Feb 2007 14:49:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/called-a-script-within-a-script-that-requires-a-response/m-p/5027436#M97503</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2007-02-08T14:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: called a script within a script that requires a response</title>
      <link>https://community.hpe.com/t5/operating-system-linux/called-a-script-within-a-script-that-requires-a-response/m-p/5027437#M97504</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;# cat script1&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;echo "running..."&lt;BR /&gt;echo "YES!" | script2&lt;BR /&gt;echo "done"&lt;BR /&gt;&lt;BR /&gt;# cat script2&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;read REPLY&lt;BR /&gt;echo "You said ${REPLY}"&lt;BR /&gt;&lt;BR /&gt;# ./script1&lt;BR /&gt;running...&lt;BR /&gt;You said YES!&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 08 Feb 2007 14:52:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/called-a-script-within-a-script-that-requires-a-response/m-p/5027437#M97504</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-02-08T14:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: called a script within a script that requires a response</title>
      <link>https://community.hpe.com/t5/operating-system-linux/called-a-script-within-a-script-that-requires-a-response/m-p/5027438#M97505</link>
      <description>If you can anticipate all the responses, then all you need to do is create a file and redirect stdin or use a pipe.&lt;BR /&gt;&lt;BR /&gt;echo "Y" | myscript.sh&lt;BR /&gt;&lt;BR /&gt;Now when faced with more complicated choices (ie the questions change with varying conditions), that becomes the role of the expect utility.&lt;BR /&gt;&lt;A href="http://hpux.its.tudelft.nl/hppd/hpux/Tcl/expect-5.43/" target="_blank"&gt;http://hpux.its.tudelft.nl/hppd/hpux/Tcl/expect-5.43/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;But for your simple case, reading from a file or pipe should suffice.&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Feb 2007 14:52:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/called-a-script-within-a-script-that-requires-a-response/m-p/5027438#M97505</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-02-08T14:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: called a script within a script that requires a response</title>
      <link>https://community.hpe.com/t5/operating-system-linux/called-a-script-within-a-script-that-requires-a-response/m-p/5027439#M97506</link>
      <description>THANKS EVERYONE!</description>
      <pubDate>Thu, 08 Feb 2007 16:06:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/called-a-script-within-a-script-that-requires-a-response/m-p/5027439#M97506</guid>
      <dc:creator>f. halili</dc:creator>
      <dc:date>2007-02-08T16:06:42Z</dc:date>
    </item>
  </channel>
</rss>

