Re: doing simple math in bash :: prb with leading zero
From:
pk
Subject:
Re: doing simple math in bash :: prb with leading zero
Date:
Tue, 01 Sep 2009 22:41:48 +0100
ken wrote:
> This is what I get on Linux running on an i686.
>
> Bash should be smart enough to know that 09 = 9
> -- and it does sometimes, but not all the time.
> Surprise!!
>From the bash manual:
"Constants with a leading 0 are interpreted as octal numbers. A leading 0x
or 0X denotes hexadecimal."