Subject: Re: Arithmetic, octal and leading zeroes in sh
To: Todd Vierling <>
From: Stephen Borrill <>
List: netbsd-users
Date: 10/13/2005 15:54:06
On Thu, 13 Oct 2005, Todd Vierling wrote:
>> I see from the 1.11 commit this is to recognise octal and hex, but must a
>> leading zero always indicate octal?
> Yes; that's standard practice in Unix (and the C programming language).

Sure, but I meant must it always do so in the shell? Doing so requires 
scripts to work around this if they want to use 'normal' :-) arithmetic
on numbers that may be, for instance, input by the user or returned from
date +%M

> It is also required by the Open Group shell specification:

That answers the question above.