math support in busybox shells

Mike Frysinger vapier at gentoo.org
Thu Apr 2 17:05:04 UTC 2009


On Thursday 02 April 2009 12:34:58 Denys Vlasenko wrote:
> 2009/4/2 Mike Frysinger <vapier at gentoo.org>:
> > only real issue ive seen so far is hush specific.  atm, the parser
> > consumes all of $((...)) without doing any expansion on the resulting
> > string.  so if i do something like:
> > i=0
> > echo $(($i + 1))
> > the arith routine expects "0 + 1" but gets "$i + 1" and so dies -- it is
> > the job of the shell to do dollar expansion first.  the non-dollar
> > version works fine of course:
> > echo $((i + 1))
>
> Fixed in svn.

well geez, if you're just gonna fix things for me, i'll file more reports :)

thanks !
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20090402/66bb7c31/attachment.pgp>


More information about the busybox mailing list