<?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: creating a menu in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/creating-a-menu/m-p/4846609#M394142</link>
    <description>Hi&lt;BR /&gt;&lt;BR /&gt;simply create a while-loop which is always true:&lt;BR /&gt;&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;&lt;BR /&gt;echo " 1. who am I"&lt;BR /&gt;echo " who is login"&lt;BR /&gt;echo " enter your choice \c:"&lt;BR /&gt;read VAR&lt;BR /&gt;case $VAR in&lt;BR /&gt;1) whoami&lt;BR /&gt;;;&lt;BR /&gt;2) finger|pg&lt;BR /&gt;;;&lt;BR /&gt;3) exit&lt;BR /&gt;;;&lt;BR /&gt;* ) echo " you have not entered a valid option"&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Chris</description>
    <pubDate>Wed, 02 Oct 2002 04:30:23 GMT</pubDate>
    <dc:creator>Christian Gebhardt</dc:creator>
    <dc:date>2002-10-02T04:30:23Z</dc:date>
    <item>
      <title>creating a menu</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/creating-a-menu/m-p/4846606#M394139</link>
      <description>I've created a menu with different options, but I used the esac at the end of the script which force me to log off after taking an option. Could anyone please advise to change the script to take me back to the menu after executing an option from the menu.&lt;BR /&gt;here is an example:&lt;BR /&gt;i.e.)&lt;BR /&gt;echo " 1. who am I"&lt;BR /&gt;echo " who is login"&lt;BR /&gt;echo " enter your choice \c:"&lt;BR /&gt;read VAR&lt;BR /&gt;case $VAR in&lt;BR /&gt;      1) whoami&lt;BR /&gt;      ;;&lt;BR /&gt;      2) finger|pg&lt;BR /&gt;      ;;&lt;BR /&gt;* ) echo " you have not entered a valid option"&lt;BR /&gt;esac&lt;BR /&gt;echo "end of program</description>
      <pubDate>Wed, 02 Oct 2002 03:18:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/creating-a-menu/m-p/4846606#M394139</guid>
      <dc:creator>Norman_21</dc:creator>
      <dc:date>2002-10-02T03:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: creating a menu</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/creating-a-menu/m-p/4846607#M394140</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;simply create a while-loop that is always true:&lt;BR /&gt;&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;&lt;BR /&gt;echo " 1. who am I"&lt;BR /&gt;echo " who is login"&lt;BR /&gt;echo " enter your choice \c:"&lt;BR /&gt;read VAR&lt;BR /&gt;case $VAR in&lt;BR /&gt;1) whoami&lt;BR /&gt;;;&lt;BR /&gt;2) finger|pg&lt;BR /&gt;;;&lt;BR /&gt;3) exit&lt;BR /&gt;;;&lt;BR /&gt;* ) echo " you have not entered a valid option"&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Chris</description>
      <pubDate>Wed, 02 Oct 2002 04:25:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/creating-a-menu/m-p/4846607#M394140</guid>
      <dc:creator>Christian Gebhardt</dc:creator>
      <dc:date>2002-10-02T04:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: creating a menu</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/creating-a-menu/m-p/4846608#M394141</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;simply create a while-loop which is always true:&lt;BR /&gt;&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;&lt;BR /&gt;echo " 1. who am I"&lt;BR /&gt;echo " who is login"&lt;BR /&gt;echo " enter your choice \c:"&lt;BR /&gt;read VAR&lt;BR /&gt;case $VAR in&lt;BR /&gt;1) whoami&lt;BR /&gt;;;&lt;BR /&gt;2) finger|pg&lt;BR /&gt;;;&lt;BR /&gt;3) exit&lt;BR /&gt;;;&lt;BR /&gt;* ) echo " you have not entered a valid option"&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Chris</description>
      <pubDate>Wed, 02 Oct 2002 04:29:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/creating-a-menu/m-p/4846608#M394141</guid>
      <dc:creator>Christian Gebhardt</dc:creator>
      <dc:date>2002-10-02T04:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: creating a menu</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/creating-a-menu/m-p/4846609#M394142</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;simply create a while-loop which is always true:&lt;BR /&gt;&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;&lt;BR /&gt;echo " 1. who am I"&lt;BR /&gt;echo " who is login"&lt;BR /&gt;echo " enter your choice \c:"&lt;BR /&gt;read VAR&lt;BR /&gt;case $VAR in&lt;BR /&gt;1) whoami&lt;BR /&gt;;;&lt;BR /&gt;2) finger|pg&lt;BR /&gt;;;&lt;BR /&gt;3) exit&lt;BR /&gt;;;&lt;BR /&gt;* ) echo " you have not entered a valid option"&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Chris</description>
      <pubDate>Wed, 02 Oct 2002 04:30:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/creating-a-menu/m-p/4846609#M394142</guid>
      <dc:creator>Christian Gebhardt</dc:creator>
      <dc:date>2002-10-02T04:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: creating a menu</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/creating-a-menu/m-p/4846610#M394143</link>
      <description>Hi,&lt;BR /&gt;you can put a until-do-done construction around it like:&lt;BR /&gt;&lt;BR /&gt;VAR=0&lt;BR /&gt;until (( VAR = 3 ))&lt;BR /&gt;do&lt;BR /&gt;  case&lt;BR /&gt;  add an option 3 exit ;;&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Good luck &lt;BR /&gt;Donald</description>
      <pubDate>Wed, 02 Oct 2002 04:31:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/creating-a-menu/m-p/4846610#M394143</guid>
      <dc:creator>Donald Kok</dc:creator>
      <dc:date>2002-10-02T04:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: creating a menu</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/creating-a-menu/m-p/4846611#M394144</link>
      <description>Hi,&lt;BR /&gt;you can put a until-do-done construction around it like:&lt;BR /&gt;&lt;BR /&gt;VAR=0&lt;BR /&gt;until (( VAR = 3 ))&lt;BR /&gt;do&lt;BR /&gt;  case&lt;BR /&gt;  add an option 3 exit ;;&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Good luck &lt;BR /&gt;Donald</description>
      <pubDate>Wed, 02 Oct 2002 04:32:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/creating-a-menu/m-p/4846611#M394144</guid>
      <dc:creator>Donald Kok</dc:creator>
      <dc:date>2002-10-02T04:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: creating a menu</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/creating-a-menu/m-p/4846612#M394145</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;simply create a while-loop which is always true:&lt;BR /&gt;&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;&lt;BR /&gt;echo " 1. who am I"&lt;BR /&gt;echo " who is login"&lt;BR /&gt;echo " enter your choice \c:"&lt;BR /&gt;read VAR&lt;BR /&gt;case $VAR in&lt;BR /&gt;1) whoami&lt;BR /&gt;;;&lt;BR /&gt;2) finger|pg&lt;BR /&gt;;;&lt;BR /&gt;3) exit&lt;BR /&gt;;;&lt;BR /&gt;* ) echo " you have not entered a valid option"&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Chris</description>
      <pubDate>Wed, 02 Oct 2002 04:33:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/creating-a-menu/m-p/4846612#M394145</guid>
      <dc:creator>Christian Gebhardt</dc:creator>
      <dc:date>2002-10-02T04:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: creating a menu</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/creating-a-menu/m-p/4846613#M394146</link>
      <description>excuse me, my browser returned with error code 404 some times so I posted the answer again and agaian, ... but obviously the the forum works &lt;BR /&gt;&lt;BR /&gt;Chris</description>
      <pubDate>Wed, 02 Oct 2002 04:37:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/creating-a-menu/m-p/4846613#M394146</guid>
      <dc:creator>Christian Gebhardt</dc:creator>
      <dc:date>2002-10-02T04:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: creating a menu</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/creating-a-menu/m-p/4846614#M394147</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;you already have the solution in the above replies.&lt;BR /&gt;&lt;BR /&gt;to add on to them, a piece of code that i frquently use:&lt;BR /&gt;=============================&lt;BR /&gt;ANSW="X"&lt;BR /&gt;until [ $ANSW = "Y" -o $ANSW = "N" -o $ANSW = "y" -o $ANSW = "n" ] 2&amp;gt; /dev/null&lt;BR /&gt;do&lt;BR /&gt;   echo  "Do you want to continue?\c "&lt;BR /&gt;   read ANSW&lt;BR /&gt;   ANSW=${ANSW:-n}&lt;BR /&gt;done&lt;BR /&gt;=============================&lt;BR /&gt;&lt;BR /&gt;Hope this helps too!&lt;BR /&gt;&lt;BR /&gt;Best Regards&lt;BR /&gt;Yogeeraj</description>
      <pubDate>Wed, 02 Oct 2002 05:17:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/creating-a-menu/m-p/4846614#M394147</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2002-10-02T05:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: creating a menu</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/creating-a-menu/m-p/4846615#M394148</link>
      <description>Chris, Donald,&lt;BR /&gt;Thanks guys for the quick support.&lt;BR /&gt;&lt;BR /&gt;Yojeeraj,&lt;BR /&gt;&lt;BR /&gt;My man Yojeeraj, do I add it right under each option!&lt;BR /&gt;appreciate your advise.&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Oct 2002 06:51:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/creating-a-menu/m-p/4846615#M394148</guid>
      <dc:creator>Norman_21</dc:creator>
      <dc:date>2002-10-02T06:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: creating a menu</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/creating-a-menu/m-p/4846616#M394149</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Instead of checking input from a 'read' for uppercase and lowercase strings, declare the receiving variable of the read like this:&lt;BR /&gt;&lt;BR /&gt;# typeset -l VAR&lt;BR /&gt;&lt;BR /&gt;Now uppercase letters are converted to lowercase ones and you only need test for the lowercase variant.&lt;BR /&gt;&lt;BR /&gt;Conversely, if you wsnt to convert all lowercase characters to uppercase characters, use:&lt;BR /&gt;&lt;BR /&gt;# typeset -u VAR&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 02 Oct 2002 10:42:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/creating-a-menu/m-p/4846616#M394149</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-10-02T10:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: creating a menu</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/creating-a-menu/m-p/4846617#M394150</link>
      <description>Closed...</description>
      <pubDate>Thu, 24 Feb 2005 13:00:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/creating-a-menu/m-p/4846617#M394150</guid>
      <dc:creator>Norman_21</dc:creator>
      <dc:date>2005-02-24T13:00:48Z</dc:date>
    </item>
  </channel>
</rss>

