<?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 need script to provide program user repsonse in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/need-script-to-provide-program-user-repsonse/m-p/3539363#M701660</link>
    <description>I have this program which needs to be called repeatedly with different arguments.  The program itself eventually asks the user to answer yes or no to a question.&lt;BR /&gt;&lt;BR /&gt;I have written a script which repeatedly calls the program with different arguements, no problem.  But it is possible for me to know the answer to the yes or no question ahead of time.  So I'd like the script to provide the user's repsonse automatically.  Basically if I know the answer will always be yes each time the program is called, when the program has stopped and is waiting on the user input I want the script to respond with yes.&lt;BR /&gt;&lt;BR /&gt;Any examples?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Rick</description>
    <pubDate>Fri, 06 May 2005 09:42:41 GMT</pubDate>
    <dc:creator>Rick Burge_3</dc:creator>
    <dc:date>2005-05-06T09:42:41Z</dc:date>
    <item>
      <title>need script to provide program user repsonse</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-script-to-provide-program-user-repsonse/m-p/3539363#M701660</link>
      <description>I have this program which needs to be called repeatedly with different arguments.  The program itself eventually asks the user to answer yes or no to a question.&lt;BR /&gt;&lt;BR /&gt;I have written a script which repeatedly calls the program with different arguements, no problem.  But it is possible for me to know the answer to the yes or no question ahead of time.  So I'd like the script to provide the user's repsonse automatically.  Basically if I know the answer will always be yes each time the program is called, when the program has stopped and is waiting on the user input I want the script to respond with yes.&lt;BR /&gt;&lt;BR /&gt;Any examples?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Rick</description>
      <pubDate>Fri, 06 May 2005 09:42:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-script-to-provide-program-user-repsonse/m-p/3539363#M701660</guid>
      <dc:creator>Rick Burge_3</dc:creator>
      <dc:date>2005-05-06T09:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: need script to provide program user repsonse</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-script-to-provide-program-user-repsonse/m-p/3539364#M701661</link>
      <description>I would look at using Expect for something like this.&lt;BR /&gt;&lt;BR /&gt;Expect allows you to respond depending on the prompt that is presented.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Tcl/expect-5.43/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Tcl/expect-5.43/&lt;/A&gt;</description>
      <pubDate>Fri, 06 May 2005 09:46:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-script-to-provide-program-user-repsonse/m-p/3539364#M701661</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2005-05-06T09:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: need script to provide program user repsonse</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-script-to-provide-program-user-repsonse/m-p/3539365#M701662</link>
      <description>Well 'expect' is one tool that you can use. But since there is only one point of user interaction you can use pipe (|) &lt;BR /&gt;&lt;BR /&gt;$ echo yes | &amp;lt;script&amp;gt; &lt;ARG&gt;&lt;BR /&gt;&lt;BR /&gt;You can even capture the results if you want.&lt;BR /&gt;&lt;BR /&gt;$ x=`echo yes | &amp;lt;script&amp;gt; &lt;ARG&gt;` &lt;BR /&gt;$ echo $x&lt;/ARG&gt;&lt;/ARG&gt;</description>
      <pubDate>Fri, 06 May 2005 09:58:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-script-to-provide-program-user-repsonse/m-p/3539365#M701662</guid>
      <dc:creator>Amit Agarwal_1</dc:creator>
      <dc:date>2005-05-06T09:58:56Z</dc:date>
    </item>
  </channel>
</rss>

