<?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: menu scrpit  question (loop) in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486376#M18894</link>
    <description>ok I just tried that.. but now from the submenu&lt;BR /&gt;I cant break back the the main menu.&lt;BR /&gt;</description>
    <pubDate>Wed, 24 Jan 2001 20:36:38 GMT</pubDate>
    <dc:creator>someone_4</dc:creator>
    <dc:date>2001-01-24T20:36:38Z</dc:date>
    <item>
      <title>menu scrpit  question (loop)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486373#M18891</link>
      <description>I have attached a menu script.&lt;BR /&gt;And it works great. But I have a main menu, &lt;BR /&gt;and a sub menu as shown in the attachment.&lt;BR /&gt;But from the submenu I execute a choice and tail the log and break out of the log it takes me to the main menu. But I would like it to take me back to submenu1 not the main menu.&lt;BR /&gt;And then from the submenu1 I can break out to the main menu. Is there a way to do that or do i always have to go back to the main menu?</description>
      <pubDate>Wed, 24 Jan 2001 20:15:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486373#M18891</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2001-01-24T20:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: menu scrpit  question (loop)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486374#M18892</link>
      <description>I am planning on adding more submenus with other options. But I want them to all go back to the sub menu , not the main menu. &lt;BR /&gt;thanks&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Jan 2001 20:21:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486374#M18892</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2001-01-24T20:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: menu scrpit  question (loop)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486375#M18893</link>
      <description>Richard,&lt;BR /&gt;If you change your 'if [ "${X}" -eq "1" ]; then' statement to a 'while [ "${X}" -eq "1" ]; do' statement (and change the matching 'fi' to a 'done', that should do the trick.  I have one like yours, with sub-menus, and if you'd like I'll post it for you.&lt;BR /&gt;Hope this helps,&lt;BR /&gt;Mo</description>
      <pubDate>Wed, 24 Jan 2001 20:30:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486375#M18893</guid>
      <dc:creator>Maureen Gunkel</dc:creator>
      <dc:date>2001-01-24T20:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: menu scrpit  question (loop)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486376#M18894</link>
      <description>ok I just tried that.. but now from the submenu&lt;BR /&gt;I cant break back the the main menu.&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Jan 2001 20:36:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486376#M18894</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2001-01-24T20:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: menu scrpit  question (loop)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486377#M18895</link>
      <description>Richard:&lt;BR /&gt;&lt;BR /&gt;One way to structure menu scripts like this is to form an outer 'while true do' loop which uses a case statement to call functions within you shell script.  Each function can have its own 'while true do' loop to select, read, case, etc.  Use 'return' to exit the function back to the outer loop, etc.&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 24 Jan 2001 20:40:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486377#M18895</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-01-24T20:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: menu scrpit  question (loop)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486378#M18896</link>
      <description>Richard,&lt;BR /&gt;If you add a line like:&lt;BR /&gt;echo "    0) Return to main menu \n"&lt;BR /&gt;when the user presses 0, change the assignment of variable 'X' to 0, then it won't be equal to 1 anymore. &lt;BR /&gt;By the way, I have posted my script, you can take what you want from it. It's real long, and kinda involved, but look for the 'REALSTART' part, and that'll get you started.&lt;BR /&gt;Peace!&lt;BR /&gt;Mo</description>
      <pubDate>Wed, 24 Jan 2001 20:45:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486378#M18896</guid>
      <dc:creator>Maureen Gunkel</dc:creator>
      <dc:date>2001-01-24T20:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: menu scrpit  question (loop)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486379#M18897</link>
      <description>ok .. that last one lost me .. which X do I change. Attached is what I changed so far.&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Jan 2001 21:01:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486379#M18897</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2001-01-24T21:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: menu scrpit  question (loop)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486380#M18898</link>
      <description>ok .. that last one lost me .. which X do I change. Attached is what I changed so far.&lt;BR /&gt;But I dont understand where you want me to change X. With this one I get to the sub menu, but that is where i get stuck. I cant break out of the sub menu back to the main menu. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Jan 2001 21:02:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486380#M18898</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2001-01-24T21:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: menu scrpit  question (loop)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486381#M18899</link>
      <description>Richard,&lt;BR /&gt;I'm working on it.  I'll attach a revised copy when I figure it out.&lt;BR /&gt;Mo</description>
      <pubDate>Wed, 24 Jan 2001 22:06:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486381#M18899</guid>
      <dc:creator>Maureen Gunkel</dc:creator>
      <dc:date>2001-01-24T22:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: menu scrpit  question (loop)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486382#M18900</link>
      <description>Ok here is what I have I added :&lt;BR /&gt;X=99&lt;BR /&gt;while [ ! $X -eq 0 ]&lt;BR /&gt;--- &lt;BR /&gt;and if you look at option 3 it reads the 99.&lt;BR /&gt;---&lt;BR /&gt;I know 3 menus deep is too much.. But im just wondering if I did. can I put&lt;BR /&gt;X=99&lt;BR /&gt;X=98&lt;BR /&gt;X=97&lt;BR /&gt;---&lt;BR /&gt;to control what menu the sub or sub/sub will go? I may try that just for fun later on.&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Jan 2001 22:15:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486382#M18900</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2001-01-24T22:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: menu scrpit  question (loop)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486383#M18901</link>
      <description>OHHH .. IT ALL WORKS TOO !! &lt;BR /&gt;Forgot to mention that.. thanks for all your help. &lt;BR /&gt;&lt;BR /&gt;Richard .. &lt;BR /&gt;</description>
      <pubDate>Wed, 24 Jan 2001 22:16:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486383#M18901</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2001-01-24T22:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: menu scrpit  question (loop)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486384#M18902</link>
      <description>This is what Maureen is saying.&lt;BR /&gt;&lt;BR /&gt;#Add Another choice to your list&lt;BR /&gt;echo "PRESS '3' to exit" &lt;BR /&gt;&lt;BR /&gt;#Add the choice&lt;BR /&gt;#choice 3   &lt;BR /&gt;   if [ "${Y}" -eq "3" ];then&lt;BR /&gt;   clear &lt;BR /&gt;   X=2&lt;BR /&gt;   fi&lt;BR /&gt;&lt;BR /&gt;This will make X != 1 thus exiting the look for the submenu and returning you to the main menu&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Jan 2001 22:20:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486384#M18902</guid>
      <dc:creator>Joseph C. Denman</dc:creator>
      <dc:date>2001-01-24T22:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: menu scrpit  question (loop)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486385#M18903</link>
      <description>=)&lt;BR /&gt;Yeah after taking a break and looking at it .. it hit me like a ton of bricks !</description>
      <pubDate>Wed, 24 Jan 2001 22:22:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/menu-scrpit-question-loop/m-p/2486385#M18903</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2001-01-24T22:22:53Z</dc:date>
    </item>
  </channel>
</rss>

