<?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: goto command in shell in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/goto-command-in-shell/m-p/2729214#M836071</link>
    <description>There is a goto in csh.  Not recommended though.  It's thought to be poor programming practice.</description>
    <pubDate>Wed, 22 May 2002 18:20:04 GMT</pubDate>
    <dc:creator>Tom Danzig</dc:creator>
    <dc:date>2002-05-22T18:20:04Z</dc:date>
    <item>
      <title>goto command in shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/goto-command-in-shell/m-p/2729206#M836063</link>
      <description>Hi guys,&lt;BR /&gt;&lt;BR /&gt;Is there a goto command in shell? And if there is one, does anyone know how to use it?&lt;BR /&gt;&lt;BR /&gt;Thank you!</description>
      <pubDate>Wed, 22 May 2002 13:34:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/goto-command-in-shell/m-p/2729206#M836063</guid>
      <dc:creator>andi_1</dc:creator>
      <dc:date>2002-05-22T13:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: goto command in shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/goto-command-in-shell/m-p/2729207#M836064</link>
      <description>Hi Andi,&lt;BR /&gt;&lt;BR /&gt;As I know there is not a goto command in shell, but if you think there is not necessary to do the things that you want to do.&lt;BR /&gt;&lt;BR /&gt;If you want I can help you with your script.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Justo.</description>
      <pubDate>Wed, 22 May 2002 13:49:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/goto-command-in-shell/m-p/2729207#M836064</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-05-22T13:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: goto command in shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/goto-command-in-shell/m-p/2729208#M836065</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Sorry, no.  However, in Posix shell (or 'ksh') you have 'break' to exit from a 'for' 'select', 'until', or 'while' loop, and 'continue' to resume the next iteration of the same (for, select, until, while); and 'return' to immediately exit a function.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 22 May 2002 13:59:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/goto-command-in-shell/m-p/2729208#M836065</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-05-22T13:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: goto command in shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/goto-command-in-shell/m-p/2729209#M836066</link>
      <description>There is no goto in the Bourne, Korn, or POSIX shell but csh does have one. You should be able to circumvent the need for a goto with a 'break' to exit from the enclosing while, until, for, or select loop. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 22 May 2002 14:03:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/goto-command-in-shell/m-p/2729209#M836066</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-05-22T14:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: goto command in shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/goto-command-in-shell/m-p/2729210#M836067</link>
      <description>As Edsgar Dijkstra pointed out in the 60's, the goto is harmful, which is one of the reasons that higher level languages accomplish tasks in a top down manner. Looping is handled with for/while/until and bailing out due to errors or special exits is accomplished with functions, traps and break or continue.&lt;BR /&gt;&lt;BR /&gt;Nothing messes up easily understood code better than a goto.</description>
      <pubDate>Wed, 22 May 2002 14:15:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/goto-command-in-shell/m-p/2729210#M836067</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2002-05-22T14:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: goto command in shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/goto-command-in-shell/m-p/2729211#M836068</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;As all have said no goto but calling a script from a script can be made to behave like a goto.&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Wed, 22 May 2002 14:21:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/goto-command-in-shell/m-p/2729211#M836068</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2002-05-22T14:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: goto command in shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/goto-command-in-shell/m-p/2729212#M836069</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;Bill made me chuckle, having been around awhile...  Be glad for 'break' and 'continue' at least.  I once developed some communication "algorithms" in a network language (NDLII on Burroughs (Unisys)) that not only lacked "goto" but also *any* way to break out of a loop short of setting a boolean variable, testing it and conditionally executing or not the next block of code.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 22 May 2002 14:39:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/goto-command-in-shell/m-p/2729212#M836069</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-05-22T14:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: goto command in shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/goto-command-in-shell/m-p/2729213#M836070</link>
      <description>Hi andi,&lt;BR /&gt;&lt;BR /&gt; As Paula stated you can call another script from w/in a script - but keep in mind you cannot go back. And don't try to call back to the org script or you'll be in loop hell as it would go back to the start of the org script &amp;amp; hit the call, which hits the call in 2nd script, etc.&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jeff</description>
      <pubDate>Wed, 22 May 2002 14:59:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/goto-command-in-shell/m-p/2729213#M836070</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2002-05-22T14:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: goto command in shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/goto-command-in-shell/m-p/2729214#M836071</link>
      <description>There is a goto in csh.  Not recommended though.  It's thought to be poor programming practice.</description>
      <pubDate>Wed, 22 May 2002 18:20:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/goto-command-in-shell/m-p/2729214#M836071</guid>
      <dc:creator>Tom Danzig</dc:creator>
      <dc:date>2002-05-22T18:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: goto command in shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/goto-command-in-shell/m-p/2729215#M836072</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;...and the 'csh' is a poor practice shell... :-))&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 22 May 2002 18:23:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/goto-command-in-shell/m-p/2729215#M836072</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-05-22T18:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: goto command in shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/goto-command-in-shell/m-p/2729216#M836073</link>
      <description>One good way to branch to different logic is the case statement.  An example can be found in the accounting script /usr/lib/acct/runacct.&lt;BR /&gt;It uses the case statement to restart accounting is if fails partway through the processing.</description>
      <pubDate>Thu, 23 May 2002 13:20:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/goto-command-in-shell/m-p/2729216#M836073</guid>
      <dc:creator>Ed Sampson</dc:creator>
      <dc:date>2002-05-23T13:20:44Z</dc:date>
    </item>
  </channel>
</rss>

