<?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 Passing valu to a menu driven program in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/passing-valu-to-a-menu-driven-program/m-p/3538422#M222713</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt; I have an executable file which is a menu driven program. I need to select certain option in the menu. For eg&lt;BR /&gt;&lt;BR /&gt;#/usr/sbin/foo  &lt;EXECUTABLE&gt;&lt;BR /&gt;&lt;BR /&gt; Now one menu will appear with some options&lt;BR /&gt; 1.abcd&lt;BR /&gt; 2.efgh&lt;BR /&gt; 3.ijkl&lt;BR /&gt; 4.mnop&lt;BR /&gt; 0.Exit&lt;BR /&gt; &lt;BR /&gt; Enter your choice&amp;gt;&lt;BR /&gt;&lt;BR /&gt;I need to select 2, and the 1 in the submenu and then 0 to exit. Can this selection be automated in a script?&lt;BR /&gt;&lt;BR /&gt;Replys are higly appreciated.&lt;BR /&gt;&lt;BR /&gt;TIA&lt;BR /&gt;Shahul&lt;/EXECUTABLE&gt;</description>
    <pubDate>Thu, 05 May 2005 08:44:36 GMT</pubDate>
    <dc:creator>Shahul</dc:creator>
    <dc:date>2005-05-05T08:44:36Z</dc:date>
    <item>
      <title>Passing valu to a menu driven program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passing-valu-to-a-menu-driven-program/m-p/3538422#M222713</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt; I have an executable file which is a menu driven program. I need to select certain option in the menu. For eg&lt;BR /&gt;&lt;BR /&gt;#/usr/sbin/foo  &lt;EXECUTABLE&gt;&lt;BR /&gt;&lt;BR /&gt; Now one menu will appear with some options&lt;BR /&gt; 1.abcd&lt;BR /&gt; 2.efgh&lt;BR /&gt; 3.ijkl&lt;BR /&gt; 4.mnop&lt;BR /&gt; 0.Exit&lt;BR /&gt; &lt;BR /&gt; Enter your choice&amp;gt;&lt;BR /&gt;&lt;BR /&gt;I need to select 2, and the 1 in the submenu and then 0 to exit. Can this selection be automated in a script?&lt;BR /&gt;&lt;BR /&gt;Replys are higly appreciated.&lt;BR /&gt;&lt;BR /&gt;TIA&lt;BR /&gt;Shahul&lt;/EXECUTABLE&gt;</description>
      <pubDate>Thu, 05 May 2005 08:44:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passing-valu-to-a-menu-driven-program/m-p/3538422#M222713</guid>
      <dc:creator>Shahul</dc:creator>
      <dc:date>2005-05-05T08:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: Passing valu to a menu driven program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passing-valu-to-a-menu-driven-program/m-p/3538423#M222714</link>
      <description>&lt;BR /&gt;PS3="Enter your choice&amp;gt; "&lt;BR /&gt;select answer in  "1.abcd" "2.efgh" "3.ijkl" "4.mnop" "0.Exit"&lt;BR /&gt;do&lt;BR /&gt;case $answer in &lt;BR /&gt;"1.abcd" )&lt;BR /&gt;&lt;EXECUTE your="" code="" for="" 1=""&gt;;;&lt;BR /&gt;"2.efgh" )&lt;BR /&gt;&lt;EXECUTE your="" code="" for="" 2=""&gt;;;&lt;BR /&gt;"3.ijkl" )&lt;BR /&gt;&lt;EXECUTE your="" code="" for="" 3=""&gt;;;&lt;BR /&gt;"4.mnop" )&lt;BR /&gt;&lt;EXECUTE your="" code="" for="" 4=""&gt;;;&lt;BR /&gt;"0.Exit" )&lt;BR /&gt;exit 0;;&lt;BR /&gt;* )&lt;BR /&gt;echo "invalid choice"&lt;BR /&gt;esac&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete&lt;/EXECUTE&gt;&lt;/EXECUTE&gt;&lt;/EXECUTE&gt;&lt;/EXECUTE&gt;</description>
      <pubDate>Thu, 05 May 2005 08:55:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passing-valu-to-a-menu-driven-program/m-p/3538423#M222714</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2005-05-05T08:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Passing valu to a menu driven program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passing-valu-to-a-menu-driven-program/m-p/3538424#M222715</link>
      <description>Hi Pete,&lt;BR /&gt;&lt;BR /&gt;  Thanks for your response. I think you did not get it right/ I did not put it right. The menu with 0 to 4 option is displayed by an executable program, ie. /usr/sbin/foo. I can not change this executable. I want to select certain options from that menu. Manually I am able to select through keyboard, My question is, can I automate this by using a value / parameter?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Shahul</description>
      <pubDate>Thu, 05 May 2005 09:50:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passing-valu-to-a-menu-driven-program/m-p/3538424#M222715</guid>
      <dc:creator>Shahul</dc:creator>
      <dc:date>2005-05-05T09:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: Passing valu to a menu driven program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passing-valu-to-a-menu-driven-program/m-p/3538425#M222716</link>
      <description>You mean like a script with the contents;&lt;BR /&gt;/usr/sbin/foo &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;2&lt;BR /&gt;1&lt;BR /&gt;0&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;So it will select 2, then 1, then 0.</description>
      <pubDate>Thu, 05 May 2005 16:34:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passing-valu-to-a-menu-driven-program/m-p/3538425#M222716</guid>
      <dc:creator>Robert Salter</dc:creator>
      <dc:date>2005-05-05T16:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Passing valu to a menu driven program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passing-valu-to-a-menu-driven-program/m-p/3538426#M222717</link>
      <description>If Robert's suggestion does not work, the you will need to take a look at Expect.  Expect is a programming / scripting language that is designed to do just what you require.&lt;BR /&gt;&lt;BR /&gt;You can download Expect from here:&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;&lt;BR /&gt;</description>
      <pubDate>Thu, 05 May 2005 16:48:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passing-valu-to-a-menu-driven-program/m-p/3538426#M222717</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2005-05-05T16:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Passing valu to a menu driven program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passing-valu-to-a-menu-driven-program/m-p/3538427#M222718</link>
      <description>If you are interested in automating the interactive session, you can use either 'expect' or 'vuser' facility. I don't think they are available by default, you might need to search them on website. 'expect' is much better/powerful tool than 'vuser'&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 05 May 2005 20:34:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passing-valu-to-a-menu-driven-program/m-p/3538427#M222718</guid>
      <dc:creator>Amit Agarwal_1</dc:creator>
      <dc:date>2005-05-05T20:34:06Z</dc:date>
    </item>
  </channel>
</rss>

