bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash expr problem/bug... 0$val


From: Paul Jarc
Subject: Re: bash expr problem/bug... 0$val
Date: Fri, 19 Aug 2005 11:36:30 -0400
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux)

address@hidden wrote:
>           <bash>#  a=500; b="0$[a]"; c=$[b]; echo -e "a: $a\nb: $b\nc: $c\n"
>           a: 500
>           b: 0500
>           c: 320

man bash, under ARITHMETIC EVALUATION:
       Constants with a leading 0 are interpreted as octal numbers.


paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]