<?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 script syntax checking in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-syntax-checking/m-p/2601229#M855677</link>
    <description>When using "-n" option with sh in order to check the syntax of my script,&lt;BR /&gt;&lt;BR /&gt;# cat script&lt;BR /&gt;typeset idx=0&lt;BR /&gt;HP_DSK[$idx]="hello"&lt;BR /&gt;TOTO=${HP_DSK[$idx]}&lt;BR /&gt;&lt;BR /&gt;it returns nothing (meaning it's OK) under HP-UX 10.20.&lt;BR /&gt;But under HP-UX 11.X, I get the following error message :&lt;BR /&gt;&lt;BR /&gt;script[3]: HP_DSK: The specified subscript cannot be greater than 1024&lt;BR /&gt;&lt;BR /&gt;Is this a regression (a bug) ? or does it perform a more complete check (and so, where is my error) ?&lt;BR /&gt;</description>
    <pubDate>Thu, 25 Oct 2001 11:51:37 GMT</pubDate>
    <dc:creator>marc seguin</dc:creator>
    <dc:date>2001-10-25T11:51:37Z</dc:date>
    <item>
      <title>script syntax checking</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-syntax-checking/m-p/2601229#M855677</link>
      <description>When using "-n" option with sh in order to check the syntax of my script,&lt;BR /&gt;&lt;BR /&gt;# cat script&lt;BR /&gt;typeset idx=0&lt;BR /&gt;HP_DSK[$idx]="hello"&lt;BR /&gt;TOTO=${HP_DSK[$idx]}&lt;BR /&gt;&lt;BR /&gt;it returns nothing (meaning it's OK) under HP-UX 10.20.&lt;BR /&gt;But under HP-UX 11.X, I get the following error message :&lt;BR /&gt;&lt;BR /&gt;script[3]: HP_DSK: The specified subscript cannot be greater than 1024&lt;BR /&gt;&lt;BR /&gt;Is this a regression (a bug) ? or does it perform a more complete check (and so, where is my error) ?&lt;BR /&gt;</description>
      <pubDate>Thu, 25 Oct 2001 11:51:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-syntax-checking/m-p/2601229#M855677</guid>
      <dc:creator>marc seguin</dc:creator>
      <dc:date>2001-10-25T11:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: script syntax checking</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-syntax-checking/m-p/2601230#M855678</link>
      <description>Hi Marc:&lt;BR /&gt;&lt;BR /&gt;That is simply a warning that any array index cannot exceed 1023. The -n does not actually evaluate the expression $idx; it's just telling you that you may have problems.&lt;BR /&gt;&lt;BR /&gt;Set the value idx to 1024 and actually execute&lt;BR /&gt;you script. You will then get a real 'honest-to-God' run-rime index error.&lt;BR /&gt;&lt;BR /&gt;It appears that the warnings are simply a little better in 11x. Both OS versions will actually fail at run-time.&lt;BR /&gt;&lt;BR /&gt;Regards, Clay&lt;BR /&gt;</description>
      <pubDate>Thu, 25 Oct 2001 12:05:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-syntax-checking/m-p/2601230#M855678</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-10-25T12:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: script syntax checking</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-syntax-checking/m-p/2601231#M855679</link>
      <description>Perhaps it's a warning, but it is handled as an error.&lt;BR /&gt;Return code is 1 and not 0.&lt;BR /&gt;And, most important, it stops further checking.&lt;BR /&gt;&lt;BR /&gt;I intentionally added an error on a 4th line.&lt;BR /&gt;Under 10.20, I get an error on line 4.&lt;BR /&gt;Under 11.X, It still stops with the same message about line 3 !</description>
      <pubDate>Thu, 25 Oct 2001 12:14:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-syntax-checking/m-p/2601231#M855679</guid>
      <dc:creator>marc seguin</dc:creator>
      <dc:date>2001-10-25T12:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: script syntax checking</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-syntax-checking/m-p/2601232#M855680</link>
      <description>Hi Marc:&lt;BR /&gt;&lt;BR /&gt;A couple of comments.  First the "normal" behavior of using '-n' is to stop on the first error.  Therefore, in your 10.20 vs. 11.0 case you are *still* seeing the 11.0 behavior of the subscript limit checking.&lt;BR /&gt;&lt;BR /&gt;Most importantly, though, it looks to me too like this is a *bug*, since cases like your snippet of shell could not be debugged with the -n' option.&lt;BR /&gt;&lt;BR /&gt;I don't find this problem on 11.0 with the Korn (ksh) shell, only the Posix one.&lt;BR /&gt;&lt;BR /&gt;Also, to get real picky, the error message is poorly written -- subscripts range from 0-1023 which is 1024 elements, but... ;-)&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 25 Oct 2001 12:35:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-syntax-checking/m-p/2601232#M855680</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-10-25T12:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: script syntax checking</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-syntax-checking/m-p/2601233#M855681</link>
      <description>Marc,&lt;BR /&gt;&lt;BR /&gt;  Seems to be a bug. &lt;BR /&gt;ksh does not give the problem&lt;BR /&gt;even in 11.00 .&lt;BR /&gt;&lt;BR /&gt;-R</description>
      <pubDate>Thu, 25 Oct 2001 12:47:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-syntax-checking/m-p/2601233#M855681</guid>
      <dc:creator>Roger Baptiste</dc:creator>
      <dc:date>2001-10-25T12:47:32Z</dc:date>
    </item>
  </channel>
</rss>

