On Thursday 13 Jan 2011 21:11:07 Joe Lightning wrote:

>         Description:
>                 Bash doesn't like leading zeros in arithmetic expansion.
> 
>         Repeat-By:
>                 echo $(( 09 - 1 ))

It's all documented. Numbers with leading zeros are treated as octal. In your 
case, you can work around that by either removing the leading zeros, or 
explicitly telling bash that the number is in base 10:

$ echo $(( 10#09 - 1 ))
8

-- 
D.

Reply via email to