<?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: run script error in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/run-script-error/m-p/4333763#M342477</link>
    <description># if [[ ! $((`date +%d`)) -eq 8 ]]&lt;BR /&gt;&amp;gt; then&lt;BR /&gt;&amp;gt; echo test1&lt;BR /&gt;&amp;gt; else&lt;BR /&gt;&amp;gt; echo test2&lt;BR /&gt;&amp;gt; fi&lt;BR /&gt;test2 &amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;BR /&gt;&lt;BR /&gt;Works for me!&lt;BR /&gt;&lt;BR /&gt;Can you give the output of 'date' command on your machine? What is the OS version?&lt;BR /&gt;</description>
    <pubDate>Thu, 08 Jan 2009 06:53:48 GMT</pubDate>
    <dc:creator>Venkatesh BL</dc:creator>
    <dc:date>2009-01-08T06:53:48Z</dc:date>
    <item>
      <title>run script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-script-error/m-p/4333762#M342476</link>
      <description>if [[ ! $((`date +%d`)) -eq 8  ]]&lt;BR /&gt;        then&lt;BR /&gt;        echo test1&lt;BR /&gt;        else&lt;BR /&gt;        echo test2&lt;BR /&gt;        fi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I have a script as above , when I run it , it pop the error below.&lt;BR /&gt;&lt;BR /&gt;08: value too great for base (error token is "08")&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Today is 8th , If I change the date to other date , the problem will not happen , can advise what is wrong ? thx&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Jan 2009 06:44:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-script-error/m-p/4333762#M342476</guid>
      <dc:creator>heaman1</dc:creator>
      <dc:date>2009-01-08T06:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: run script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-script-error/m-p/4333763#M342477</link>
      <description># if [[ ! $((`date +%d`)) -eq 8 ]]&lt;BR /&gt;&amp;gt; then&lt;BR /&gt;&amp;gt; echo test1&lt;BR /&gt;&amp;gt; else&lt;BR /&gt;&amp;gt; echo test2&lt;BR /&gt;&amp;gt; fi&lt;BR /&gt;test2 &amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;BR /&gt;&lt;BR /&gt;Works for me!&lt;BR /&gt;&lt;BR /&gt;Can you give the output of 'date' command on your machine? What is the OS version?&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Jan 2009 06:53:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-script-error/m-p/4333763#M342477</guid>
      <dc:creator>Venkatesh BL</dc:creator>
      <dc:date>2009-01-08T06:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: run script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-script-error/m-p/4333764#M342478</link>
      <description>RH Linux&lt;BR /&gt;&lt;BR /&gt;$date&lt;BR /&gt;Thu Jan  8 07:00:22 GMT 2009&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Jan 2009 07:03:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-script-error/m-p/4333764#M342478</guid>
      <dc:creator>heaman1</dc:creator>
      <dc:date>2009-01-08T07:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: run script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-script-error/m-p/4333765#M342479</link>
      <description>You have been hosed by the Posix Standard where they want to use the junky C convention that 0n is an octal number.  You'll either have to use ksh or a string compare:&lt;BR /&gt;if [ $(date +%d) != "08" ]; then&lt;BR /&gt;&lt;BR /&gt;Or remove that $(( )), which screams C!&lt;BR /&gt;if [ $(date +%d) -ne 8 ]; then&lt;BR /&gt;&lt;BR /&gt;This will duplicate your error:&lt;BR /&gt;echo $(( 08 ))</description>
      <pubDate>Thu, 08 Jan 2009 07:04:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-script-error/m-p/4333765#M342479</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-01-08T07:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: run script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-script-error/m-p/4333766#M342480</link>
      <description>thx reply ,&lt;BR /&gt;&lt;BR /&gt;I tried below , it seems works,&lt;BR /&gt;&lt;BR /&gt;if [[  $(date +%d) != "07"  ]]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;but may I ask why this problem only happens when today is 8th or 9th ? thx</description>
      <pubDate>Thu, 08 Jan 2009 07:21:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-script-error/m-p/4333766#M342480</guid>
      <dc:creator>heaman1</dc:creator>
      <dc:date>2009-01-08T07:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: run script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-script-error/m-p/4333767#M342481</link>
      <description>&amp;gt; [...] why this problem only happens when&lt;BR /&gt;&amp;gt; today is 8th or 9th ?&lt;BR /&gt;&lt;BR /&gt;Because 0-7 are valid octal digits, while 8&lt;BR /&gt;and 9 are not?  And days not beginning with&lt;BR /&gt;"0" are not interpreted as octal numbers?</description>
      <pubDate>Thu, 08 Jan 2009 07:28:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-script-error/m-p/4333767#M342481</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2009-01-08T07:28:52Z</dc:date>
    </item>
  </channel>
</rss>

