Subject: Re: /bin/sh vs. /bin/ksh arithmetic expressions....
To: NetBSD Userlevel Technical Discussion List <tech-userlevel@NetBSD.ORG>
From: Greg A. Woods <woods@weird.com>
List: tech-userlevel
Date: 06/22/2004 13:05:41
[ On Thursday, June 17, 2004 at 21:37:48 (+0100), David Laight wrote: ]
> Subject: Re: /bin/sh vs. /bin/ksh arithmetic expressions....
>
> > On the other hand /bin/sh (at least on 1.6.2_STABLE) seems to have some
> > kind of parsing problem with recognizing operators when there are no
> > non-digit tokens surrounding them:
> > 
> > 	$ /bin/sh -c 'echo $((06170718+10000))'
> > 	arithmetic expression: syntax error: "06170718+10000"
> 
> Seems fine, '8' isn't an octal digit.

Damn!  That explains why it appeared to worked fine when I did a quick
and naive test -- the first number is actually generated by "date" in my
script using thsi construct.  Thanks for the clue!

-- 
						Greg A. Woods

+1 416 218-0098                  VE3TCP            RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com>          Secrets of the Weird <woods@weird.com>