bug-bash
[Top][All Lists]
Advanced

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

Re: doing simple math in bash :: prb with leading zero


From: Bob Proulx
Subject: Re: doing simple math in bash :: prb with leading zero
Date: Tue, 1 Sep 2009 15:48:47 -0600
User-agent: Mutt/1.5.18 (2008-05-17)

ken wrote:
> Doing very simple math in bash fails if a number begins with a zero (0).

Thanks for the report.  However it isn't a bug but simply a
misunderstanding.  Numbers starting with 0 are octal numbers not
decial numbers.  And as you know octal numbers includes zero through
seven but does not include eight or nine.

Please look at the Bash FAQ item E8.

  http://www.faqs.org/faqs/unix-faq/shell/bash/

Bob




reply via email to

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