0<number> is parsed as octal in places, so 09 would be bogus if octal.


2017-08-11 12:56 GMT+02:00 Alessandro DE LAURENZIS <jus...@atlantide.t28.net
>:

> Dear misc@ readers,
>
> I was doing a little exercise with integer arithmetics and noticed the
> following:
>
> [....................snip....................]
> $ echo $(expr -09 % 3)
> 0
> [....................snip....................]
>
> [....................snip....................]
> $ echo $((-09 % 3))
> sh: -09 % 3: bad number `09'
> [....................snip....................]
>
> bash seems to behave same way; just wondering if this inconsistency is
> expected...
>
> --
> Alessandro DE LAURENZIS
> [mailto:jus...@atlantide.t28.net]
> LinkedIn: http://it.linkedin.com/in/delaurenzis
>
>


-- 
May the most significant bit of your life be positive.

Reply via email to