<?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: math error under 11.23 (perceived as octal?) in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/math-error-under-11-23-perceived-as-octal/m-p/4953372#M103532</link>
    <description>Patrick's solution solved my problem.</description>
    <pubDate>Thu, 19 Jan 2006 12:13:23 GMT</pubDate>
    <dc:creator>Scott Lindstrom_2</dc:creator>
    <dc:date>2006-01-19T12:13:23Z</dc:date>
    <item>
      <title>math error under 11.23 (perceived as octal?)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/math-error-under-11-23-perceived-as-octal/m-p/4953369#M103529</link>
      <description>I have the following code the works under 11.11 (using /usr/bin/sh):&lt;BR /&gt;&lt;BR /&gt;TODAYS_JULIAN_DATE=$(date +%j)   (this yields '018' today)&lt;BR /&gt;&lt;BR /&gt;This statement then executes OK:&lt;BR /&gt;&lt;BR /&gt;((whatever=$TODAYS_JULIAN_DATE-$LAST_LOGIN_JULIAN_DATE))&lt;BR /&gt;&lt;BR /&gt;This resolves to: (( whatever=018-16 ))&lt;BR /&gt;&lt;BR /&gt;However, under 11.23 the previous statement gives the following error message:&lt;BR /&gt;&lt;BR /&gt;sh: 018-16 : The specified number is not valid for this command&lt;BR /&gt;&lt;BR /&gt;I'm guessing the shell sees '018' as an octal number, rather than a decimal number. (Not sure if that's a valid guess).&lt;BR /&gt;&lt;BR /&gt;Any ideas on what I could do so this script works under both 11.11 and 11.23?&lt;BR /&gt;&lt;BR /&gt;TIA,&lt;BR /&gt;Scott</description>
      <pubDate>Wed, 18 Jan 2006 17:29:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/math-error-under-11-23-perceived-as-octal/m-p/4953369#M103529</guid>
      <dc:creator>Scott Lindstrom_2</dc:creator>
      <dc:date>2006-01-18T17:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: math error under 11.23 (perceived as octal?)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/math-error-under-11-23-perceived-as-octal/m-p/4953370#M103530</link>
      <description>Use typeset to declare your variable types.  Do a 'man sh-posix' and search for typeset for more information.&lt;BR /&gt;&lt;BR /&gt;typeset -i TODAYS_JULIAN_DATE&lt;BR /&gt;typeset -i LAST_LOGIN_JULIAN_DATE&lt;BR /&gt;TODAYS_JULIAN_DATE=$(date +%j)&lt;BR /&gt;LAST_LOGIN_JULIAN_DATE=$(whatever you use to get 16)&lt;BR /&gt;((whatever=$TODAYS_JULIAN_DATE-$LAST_LOGIN_JULIAN_DATE))&lt;BR /&gt;&lt;BR /&gt;echo ${whatever}</description>
      <pubDate>Wed, 18 Jan 2006 17:41:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/math-error-under-11-23-perceived-as-octal/m-p/4953370#M103530</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2006-01-18T17:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: math error under 11.23 (perceived as octal?)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/math-error-under-11-23-perceived-as-octal/m-p/4953371#M103531</link>
      <description>Patrick -&lt;BR /&gt;&lt;BR /&gt;That works great!  Thanks for the help!&lt;BR /&gt;&lt;BR /&gt;(This is probably the 10th-12th time I've had to make a script change moving from 11.11 to 11.23.  Whatever happened to backwards compatibility?  AAARRRRGGGGGHHHH!)&lt;BR /&gt;&lt;BR /&gt;Scott</description>
      <pubDate>Thu, 19 Jan 2006 11:31:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/math-error-under-11-23-perceived-as-octal/m-p/4953371#M103531</guid>
      <dc:creator>Scott Lindstrom_2</dc:creator>
      <dc:date>2006-01-19T11:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: math error under 11.23 (perceived as octal?)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/math-error-under-11-23-perceived-as-octal/m-p/4953372#M103532</link>
      <description>Patrick's solution solved my problem.</description>
      <pubDate>Thu, 19 Jan 2006 12:13:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/math-error-under-11-23-perceived-as-octal/m-p/4953372#M103532</guid>
      <dc:creator>Scott Lindstrom_2</dc:creator>
      <dc:date>2006-01-19T12:13:23Z</dc:date>
    </item>
  </channel>
</rss>

