<?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: Strange sh Behavior in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/strange-sh-behavior/m-p/4986499#M100029</link>
    <description>James,&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;BR /&gt;&lt;BR /&gt;PCS</description>
    <pubDate>Tue, 20 Jun 2006 11:00:34 GMT</pubDate>
    <dc:creator>spex</dc:creator>
    <dc:date>2006-06-20T11:00:34Z</dc:date>
    <item>
      <title>Strange sh Behavior</title>
      <link>https://community.hpe.com/t5/operating-system-linux/strange-sh-behavior/m-p/4986497#M100027</link>
      <description>While working on a shell script which outputs time in HH:MM:SS format based on total seconds elapsed, I encountered something strange.  I would appreciate it if someone could explain this behavior exhibited by sh-posix and sh-bourne under HP-UX 11.00:&lt;BR /&gt;&lt;BR /&gt;# echo $(( 00 ))&lt;BR /&gt;0&lt;BR /&gt;# echo $(( 01 ))&lt;BR /&gt;1&lt;BR /&gt;# echo $(( 02 ))&lt;BR /&gt;2&lt;BR /&gt;# echo $(( 03 ))&lt;BR /&gt;3&lt;BR /&gt;# echo $(( 04 ))&lt;BR /&gt;4&lt;BR /&gt;# echo $(( 05 ))&lt;BR /&gt;5&lt;BR /&gt;# echo $(( 06 ))&lt;BR /&gt;6&lt;BR /&gt;# echo $(( 07 ))&lt;BR /&gt;7&lt;BR /&gt;# echo $(( 08 ))&lt;BR /&gt;sh: 08 : The specified number is not valid for this command.&lt;BR /&gt;# echo $(( 09 ))&lt;BR /&gt;sh: 09 : The specified number is not valid for this command.&lt;BR /&gt;# echo $(( 10 ))&lt;BR /&gt;10&lt;BR /&gt;# echo $(( 11 ))&lt;BR /&gt;11&lt;BR /&gt;&lt;BR /&gt;ksh does not exhibit this behavior.&lt;BR /&gt;&lt;BR /&gt;PCS</description>
      <pubDate>Tue, 20 Jun 2006 10:55:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/strange-sh-behavior/m-p/4986497#M100027</guid>
      <dc:creator>spex</dc:creator>
      <dc:date>2006-06-20T10:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Strange sh Behavior</title>
      <link>https://community.hpe.com/t5/operating-system-linux/strange-sh-behavior/m-p/4986498#M100028</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;A leading zero (0) in the a shell script specifies OCTAL values.  Your first tip is that eight (8) isn't valid -- it isn't in octal :-))&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 20 Jun 2006 10:59:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/strange-sh-behavior/m-p/4986498#M100028</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-06-20T10:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Strange sh Behavior</title>
      <link>https://community.hpe.com/t5/operating-system-linux/strange-sh-behavior/m-p/4986499#M100029</link>
      <description>James,&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;BR /&gt;&lt;BR /&gt;PCS</description>
      <pubDate>Tue, 20 Jun 2006 11:00:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/strange-sh-behavior/m-p/4986499#M100029</guid>
      <dc:creator>spex</dc:creator>
      <dc:date>2006-06-20T11:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: Strange sh Behavior</title>
      <link>https://community.hpe.com/t5/operating-system-linux/strange-sh-behavior/m-p/4986500#M100030</link>
      <description>Thread closed.</description>
      <pubDate>Tue, 20 Jun 2006 11:04:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/strange-sh-behavior/m-p/4986500#M100030</guid>
      <dc:creator>spex</dc:creator>
      <dc:date>2006-06-20T11:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Strange sh Behavior</title>
      <link>https://community.hpe.com/t5/operating-system-linux/strange-sh-behavior/m-p/4986501#M100031</link>
      <description>JRF wrote:&lt;BR /&gt;&amp;gt;A leading zero (0) in the a shell script specifies OCTAL values&lt;BR /&gt;&lt;BR /&gt;You can solve this by specifying the base:&lt;BR /&gt;   echo $(( 10#08 ))</description>
      <pubDate>Tue, 20 Jun 2006 16:26:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/strange-sh-behavior/m-p/4986501#M100031</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2006-06-20T16:26:55Z</dc:date>
    </item>
  </channel>
</rss>

