<?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: Problems when creating a set of menus via shell scripts in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-when-creating-a-set-of-menus-via-shell-scripts/m-p/2795761#M839263</link>
    <description>Hi Keith&lt;BR /&gt;&lt;BR /&gt;This might help:-&lt;BR /&gt;&lt;BR /&gt;continue="yes"&lt;BR /&gt;while [ "$continue" = "yes" ]&lt;BR /&gt;do&lt;BR /&gt;clear&lt;BR /&gt;&lt;BR /&gt;echo "--------------------------------- "&lt;BR /&gt;echo "            MAIN MENU             "  &lt;BR /&gt;echo " -------------------------------- "&lt;BR /&gt;echo "|                                |"  &lt;BR /&gt;echo "|       1  : SYSTEM CHECKS       |"  &lt;BR /&gt;echo "|       2  : SPIDERS             |" &lt;BR /&gt;echo "|       3  : SAM                 |" &lt;BR /&gt;echo "|       4  : System Control      |" &lt;BR /&gt;echo "|       5  : UV Admin            |" &lt;BR /&gt;echo "|       6  : Misc Checks         |" &lt;BR /&gt;echo "|       7  : Predictive          |" &lt;BR /&gt;echo "|       8  : S.T.M.              |" &lt;BR /&gt;echo "|      99  : Make Recovery       |" &lt;BR /&gt;echo "|       x  : Exit Menu           |"&lt;BR /&gt;echo " -------------------------------- "&lt;BR /&gt;echo "|       PJFC  02/2000            |"  &lt;BR /&gt;echo " -------------------------------- "&lt;BR /&gt;# updated for new sys checks&lt;BR /&gt;read ans&lt;BR /&gt;case $ans in&lt;BR /&gt;        1) ./sysadmin/menu/syschk &lt;BR /&gt;           ;;&lt;BR /&gt;        11) telnet 191.1.0.103&lt;BR /&gt;           ;;&lt;BR /&gt;        111) telnet 191.1.0.105&lt;BR /&gt;           ;;&lt;BR /&gt;        2) ./sysadmin/menu/spider &lt;BR /&gt;           ;;&lt;BR /&gt;        3) sam &lt;BR /&gt;           ;;&lt;BR /&gt;        4) ./sysadmin/menu/control &lt;BR /&gt;           ;;&lt;BR /&gt;        5) cd /universe/uv &lt;BR /&gt;           uv &lt;BR /&gt;           ;;&lt;BR /&gt;        6) ./sysadmin/menu/checks &lt;BR /&gt;           ;;&lt;BR /&gt;        7) ./opt/pred/bin/psconfig &lt;BR /&gt;           ;;&lt;BR /&gt;        8) ./usr/sbin/stm/ui/bin/stm&lt;BR /&gt;           ;;&lt;BR /&gt;        99) ./opt/ignite/bin/make_tape_recovery -x inc_entire=vg00 -I -v -a /dev/rmt/1mn &lt;BR /&gt;           ;;&lt;BR /&gt;        x) continue="no"&lt;BR /&gt;           ;;&lt;BR /&gt;        X) continue="no"&lt;BR /&gt;           ;;&lt;BR /&gt;esac&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Paula</description>
    <pubDate>Wed, 28 Aug 2002 11:00:43 GMT</pubDate>
    <dc:creator>Paula J Frazer-Campbell</dc:creator>
    <dc:date>2002-08-28T11:00:43Z</dc:date>
    <item>
      <title>Problems when creating a set of menus via shell scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-when-creating-a-set-of-menus-via-shell-scripts/m-p/2795760#M839262</link>
      <description>Hi All&lt;BR /&gt;&lt;BR /&gt;I am new to shell scripting and am trying to create a set of menus from scratch. I have created the menus and linked them together, but when i type quit i get sent back to the previous menu instead of returning to the command line. is there anyway of getting the menus to exit straight to the command line, rather then having to type quit for each copy of the menu i have visited.</description>
      <pubDate>Wed, 28 Aug 2002 10:58:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-when-creating-a-set-of-menus-via-shell-scripts/m-p/2795760#M839262</guid>
      <dc:creator>Keith Fuller_1</dc:creator>
      <dc:date>2002-08-28T10:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problems when creating a set of menus via shell scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-when-creating-a-set-of-menus-via-shell-scripts/m-p/2795761#M839263</link>
      <description>Hi Keith&lt;BR /&gt;&lt;BR /&gt;This might help:-&lt;BR /&gt;&lt;BR /&gt;continue="yes"&lt;BR /&gt;while [ "$continue" = "yes" ]&lt;BR /&gt;do&lt;BR /&gt;clear&lt;BR /&gt;&lt;BR /&gt;echo "--------------------------------- "&lt;BR /&gt;echo "            MAIN MENU             "  &lt;BR /&gt;echo " -------------------------------- "&lt;BR /&gt;echo "|                                |"  &lt;BR /&gt;echo "|       1  : SYSTEM CHECKS       |"  &lt;BR /&gt;echo "|       2  : SPIDERS             |" &lt;BR /&gt;echo "|       3  : SAM                 |" &lt;BR /&gt;echo "|       4  : System Control      |" &lt;BR /&gt;echo "|       5  : UV Admin            |" &lt;BR /&gt;echo "|       6  : Misc Checks         |" &lt;BR /&gt;echo "|       7  : Predictive          |" &lt;BR /&gt;echo "|       8  : S.T.M.              |" &lt;BR /&gt;echo "|      99  : Make Recovery       |" &lt;BR /&gt;echo "|       x  : Exit Menu           |"&lt;BR /&gt;echo " -------------------------------- "&lt;BR /&gt;echo "|       PJFC  02/2000            |"  &lt;BR /&gt;echo " -------------------------------- "&lt;BR /&gt;# updated for new sys checks&lt;BR /&gt;read ans&lt;BR /&gt;case $ans in&lt;BR /&gt;        1) ./sysadmin/menu/syschk &lt;BR /&gt;           ;;&lt;BR /&gt;        11) telnet 191.1.0.103&lt;BR /&gt;           ;;&lt;BR /&gt;        111) telnet 191.1.0.105&lt;BR /&gt;           ;;&lt;BR /&gt;        2) ./sysadmin/menu/spider &lt;BR /&gt;           ;;&lt;BR /&gt;        3) sam &lt;BR /&gt;           ;;&lt;BR /&gt;        4) ./sysadmin/menu/control &lt;BR /&gt;           ;;&lt;BR /&gt;        5) cd /universe/uv &lt;BR /&gt;           uv &lt;BR /&gt;           ;;&lt;BR /&gt;        6) ./sysadmin/menu/checks &lt;BR /&gt;           ;;&lt;BR /&gt;        7) ./opt/pred/bin/psconfig &lt;BR /&gt;           ;;&lt;BR /&gt;        8) ./usr/sbin/stm/ui/bin/stm&lt;BR /&gt;           ;;&lt;BR /&gt;        99) ./opt/ignite/bin/make_tape_recovery -x inc_entire=vg00 -I -v -a /dev/rmt/1mn &lt;BR /&gt;           ;;&lt;BR /&gt;        x) continue="no"&lt;BR /&gt;           ;;&lt;BR /&gt;        X) continue="no"&lt;BR /&gt;           ;;&lt;BR /&gt;esac&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Wed, 28 Aug 2002 11:00:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-when-creating-a-set-of-menus-via-shell-scripts/m-p/2795761#M839263</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2002-08-28T11:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problems when creating a set of menus via shell scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-when-creating-a-set-of-menus-via-shell-scripts/m-p/2795762#M839264</link>
      <description>Hi Keith&lt;BR /&gt;&lt;BR /&gt;If you exec your sub menu then an exit from that will not take you back to the previous menu.&lt;BR /&gt;&lt;BR /&gt;I.E.&lt;BR /&gt;&lt;BR /&gt;exec /sysadmin/submenu&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Wed, 28 Aug 2002 11:06:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-when-creating-a-set-of-menus-via-shell-scripts/m-p/2795762#M839264</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2002-08-28T11:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problems when creating a set of menus via shell scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-when-creating-a-set-of-menus-via-shell-scripts/m-p/2795763#M839265</link>
      <description>NO BIGGIE:&lt;BR /&gt;&lt;BR /&gt;Change these lines where you call another menu:&lt;BR /&gt;&lt;BR /&gt;testment:&lt;BR /&gt;  1) echo "Day Tasks"&lt;BR /&gt;   sleep 2&lt;BR /&gt;   daytasks&lt;BR /&gt;   ;;&lt;BR /&gt;&lt;BR /&gt;to&lt;BR /&gt;exec daytasks&lt;BR /&gt;&lt;BR /&gt;daytasks:&lt;BR /&gt;  4) echo "Back to main menu"&lt;BR /&gt;   sleep 1&lt;BR /&gt;   testmenu&lt;BR /&gt;   ;;&lt;BR /&gt;&lt;BR /&gt;to&lt;BR /&gt;&lt;BR /&gt;exec testmenu&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Although crappy coding IMO, its the solution you are looking for.&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Wed, 28 Aug 2002 11:10:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-when-creating-a-set-of-menus-via-shell-scripts/m-p/2795763#M839265</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-08-28T11:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problems when creating a set of menus via shell scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-when-creating-a-set-of-menus-via-shell-scripts/m-p/2795764#M839266</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;FYI &lt;A href="http://www.introcomp.co.uk/examples/index.html" target="_blank"&gt;http://www.introcomp.co.uk/examples/index.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;contains some good examples&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Solutions.&lt;BR /&gt;&lt;BR /&gt;After you call a new menu in a script put the word exit on the next line so the menu will&lt;BR /&gt;return to the previous menu and autoexit&lt;BR /&gt;&lt;BR /&gt;ro&lt;BR /&gt;&lt;BR /&gt;Use&lt;BR /&gt;. menu&lt;BR /&gt;&lt;BR /&gt;To activate menus.This stops the shell forking and continues at the same shell level.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;           Steve Steel</description>
      <pubDate>Wed, 28 Aug 2002 11:12:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-when-creating-a-set-of-menus-via-shell-scripts/m-p/2795764#M839266</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2002-08-28T11:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problems when creating a set of menus via shell scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-when-creating-a-set-of-menus-via-shell-scripts/m-p/2795765#M839267</link>
      <description>Hi Keith:&lt;BR /&gt;&lt;BR /&gt;If you divide your submenus into functions, you can use the 'return' command to exit the function (submenu) and thereby return to the "outer block" (main menu).  If you wish to abandon processing within a function without further ado, use 'exit' in lieu of the 'return' statement.&lt;BR /&gt;&lt;BR /&gt;Have a look at the 'sh_posix' man pages.  A quick overview of shell commands can be found here ("Shells: User's Guide"):&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/hpux/onlinedocs/B2355-90046/B2355-90046.html" target="_blank"&gt;http://docs.hp.com/hpux/onlinedocs/B2355-90046/B2355-90046.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 28 Aug 2002 11:15:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-when-creating-a-set-of-menus-via-shell-scripts/m-p/2795765#M839267</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-08-28T11:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problems when creating a set of menus via shell scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-when-creating-a-set-of-menus-via-shell-scripts/m-p/2795766#M839268</link>
      <description>Hi everyone&lt;BR /&gt;&lt;BR /&gt;Thanks for all your help, this now works.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Keith Fuller</description>
      <pubDate>Wed, 28 Aug 2002 11:19:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-when-creating-a-set-of-menus-via-shell-scripts/m-p/2795766#M839268</guid>
      <dc:creator>Keith Fuller_1</dc:creator>
      <dc:date>2002-08-28T11:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problems when creating a set of menus via shell scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-when-creating-a-set-of-menus-via-shell-scripts/m-p/2795767#M839269</link>
      <description>Sorry guys for not posting what may appear to be enough points.  However, I have seen at least one menu driven application written in ksh that allowed the user to navigate through the options by means of the arrow keys.  For my initial menu options I am using numbers/letters.  &lt;BR /&gt;&lt;BR /&gt;Thanks a lot for the responses so far.  If/when I come up with a solution, I'd like to post the script, if I complete it :-)  Well, at least the parts that are breaking my brain at the moment.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;Adam.</description>
      <pubDate>Fri, 13 May 2005 14:27:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-when-creating-a-set-of-menus-via-shell-scripts/m-p/2795767#M839269</guid>
      <dc:creator>MAD_2</dc:creator>
      <dc:date>2005-05-13T14:27:47Z</dc:date>
    </item>
  </channel>
</rss>

