* Abel Abraham Camarillo Ojeda <acam...@verlet.org> [110913 01:46]:
> Some of our shell scripts that work with dates and do something like:
> 
> month=`date +%m`
> something && month=$((month-1))
> 
> Suddenly started crashing on august... there seems to be a bug identifying
> not-numbers (numbers with leading zeroes) before '08' (eigth), how to 
> reproduce:

Quoting ksh(1):

 Additionally, integers may be prefixed with `0X' or `0x' (specifying base 16) 
or
 `0' (base 8) in all forms of arithmetic expressions, except as numeric 
arguments
 to the test command.

> ksh: 08: bad number `08'

08 doesn't exist in base 8

-- 
Alexander Polakov | plhk.ru

Reply via email to