<?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: &amp;quot;GOTO&amp;quot; in a korn shell script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-goto-quot-in-a-korn-shell-script/m-p/2813440#M84891</link>
    <description>Hi Weary:&lt;BR /&gt;&lt;BR /&gt;Make sure that your 'endofsort' begins at the leftmost character (the first) on the line.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Wed, 25 Sep 2002 18:09:55 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2002-09-25T18:09:55Z</dc:date>
    <item>
      <title>"GOTO" in a korn shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-goto-quot-in-a-korn-shell-script/m-p/2813439#M84890</link>
      <description>Hello Gang,&lt;BR /&gt;&lt;BR /&gt;I have a ksh script that has me stumped.  I have added an "if-then-else-fi" around some existing code that used to all run unconditionally, and now I've created a problem.  Can it be the here file ( &amp;lt;&amp;lt; endofsort) causing the problem?  As always, I appreciate your help.  I haven't stumped you yet:-)&lt;BR /&gt;&lt;BR /&gt;This is the block of code that has the problem:&lt;BR /&gt;&lt;BR /&gt;if [[ $_pass1 = "1" ]]&lt;BR /&gt;then&lt;BR /&gt; syncsort 2&amp;gt;&amp;gt; testfile &amp;lt;&amp;lt; endofsort&lt;BR /&gt; /infile       pas1800.dbasub00 fixed 240&lt;BR /&gt; /infile       ps2001p.p27510 fixed 240&lt;BR /&gt; /fields       f1   1  131 character&lt;BR /&gt; /keys         f1&lt;BR /&gt; /outfile      pas1800.dbasub00.pass1.memo fixed 240&lt;BR /&gt; /statistics&lt;BR /&gt; /end&lt;BR /&gt; endofsort&lt;BR /&gt; export RTNCODE=`echo $?`&lt;BR /&gt; echo Return code is $RTNCODE  &amp;gt;&amp;gt; testfile&lt;BR /&gt; case $RTNCODE in &lt;BR /&gt; 0) ;;&lt;BR /&gt; *) echo $STEP TERMINATED ABNORMALLY !!!!!!!!!! |tee -a testfile&lt;BR /&gt;    echo Error Code $RTNCODE |tee -a testfile&lt;BR /&gt;    exit $RTNCODE ;;&lt;BR /&gt; esac&lt;BR /&gt;#&lt;BR /&gt;else&lt;BR /&gt;    cp pas1800.dbasub00 pas1800.dbasub00.pass1.memo</description>
      <pubDate>Wed, 25 Sep 2002 18:03:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-goto-quot-in-a-korn-shell-script/m-p/2813439#M84890</guid>
      <dc:creator>Weary in West Chester</dc:creator>
      <dc:date>2002-09-25T18:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: "GOTO" in a korn shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-goto-quot-in-a-korn-shell-script/m-p/2813440#M84891</link>
      <description>Hi Weary:&lt;BR /&gt;&lt;BR /&gt;Make sure that your 'endofsort' begins at the leftmost character (the first) on the line.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 25 Sep 2002 18:09:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-goto-quot-in-a-korn-shell-script/m-p/2813440#M84891</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-09-25T18:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: "GOTO" in a korn shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-goto-quot-in-a-korn-shell-script/m-p/2813441#M84892</link>
      <description>I don't see "fi" to close the if-then block.&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Wed, 25 Sep 2002 18:19:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-goto-quot-in-a-korn-shell-script/m-p/2813441#M84892</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2002-09-25T18:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: "GOTO" in a korn shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-goto-quot-in-a-korn-shell-script/m-p/2813442#M84893</link>
      <description>Gosh James, you're the best.  That's all it was.  We indented to make it "pretty".  Well, so much for looking good.  It's working fine now.  Thanks so much.</description>
      <pubDate>Wed, 25 Sep 2002 18:27:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-goto-quot-in-a-korn-shell-script/m-p/2813442#M84893</guid>
      <dc:creator>Weary in West Chester</dc:creator>
      <dc:date>2002-09-25T18:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: "GOTO" in a korn shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-goto-quot-in-a-korn-shell-script/m-p/2813443#M84894</link>
      <description>Hi (again) Weary:&lt;BR /&gt;&lt;BR /&gt;/No_Points_Please/&lt;BR /&gt;&lt;BR /&gt;I like pretty, rigourously indented code too, but this is one case where you have to abide by a "higher rule" :-)&lt;BR /&gt;&lt;BR /&gt;Glad to have been of help.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 25 Sep 2002 18:33:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-goto-quot-in-a-korn-shell-script/m-p/2813443#M84894</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-09-25T18:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: "GOTO" in a korn shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-goto-quot-in-a-korn-shell-script/m-p/2813444#M84895</link>
      <description>Although the normal '&amp;lt;&amp;lt; EOF' here-document insists that the ending token (EOF) is hard up against the left margin, the alternative form '&amp;lt;&amp;lt;- EOF' does not require this.  But it will strip leading white space from your here document, which is why it works.&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;cat &amp;lt;&amp;lt;- EOF&lt;BR /&gt;hello 1&lt;BR /&gt;       hello 2&lt;BR /&gt;       EOF&lt;BR /&gt;&lt;BR /&gt;produces&lt;BR /&gt;hello 1&lt;BR /&gt;hello 2&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Sep 2002 07:08:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-goto-quot-in-a-korn-shell-script/m-p/2813444#M84895</guid>
      <dc:creator>Martin Robinson</dc:creator>
      <dc:date>2002-09-26T07:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: "GOTO" in a korn shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-goto-quot-in-a-korn-shell-script/m-p/2813445#M84896</link>
      <description>Martin,&lt;BR /&gt;&lt;BR /&gt;Thanks for the additional info.   I checked the man page (ksh - TRU64 Unix) and found that the "-" just strips off tabs from the beginning of the here document and not all white space. With tabs, it works like a champ.</description>
      <pubDate>Thu, 26 Sep 2002 12:35:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-goto-quot-in-a-korn-shell-script/m-p/2813445#M84896</guid>
      <dc:creator>Weary in West Chester</dc:creator>
      <dc:date>2002-09-26T12:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: "GOTO" in a korn shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-goto-quot-in-a-korn-shell-script/m-p/2813446#M84897</link>
      <description>Martin stated that "the alternative form '&amp;lt;&amp;lt;- EOF' does not require this. But it will strip leading white space from your here document, which is why it works. "&lt;BR /&gt;&lt;BR /&gt;Keep in mind that this works WITH TABS ONLY;  not spaces.&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Sep 2002 12:41:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-goto-quot-in-a-korn-shell-script/m-p/2813446#M84897</guid>
      <dc:creator>Tom Danzig</dc:creator>
      <dc:date>2002-09-26T12:41:16Z</dc:date>
    </item>
  </channel>
</rss>

