[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Arithmetic expansion peculiarity
From: |
Bob Proulx |
Subject: |
Re: Arithmetic expansion peculiarity |
Date: |
Fri, 14 Jan 2011 02:31:35 -0700 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
Joe Lightning wrote:
> Description:
> Bash doesn't like leading zeros in arithmetic expansion.
>
> Repeat-By:
> echo $(( 09 - 1 ))
This is bash FAQ E8.
http://www.faqs.org/faqs/unix-faq/shell/bash/
Leading zeros denote octal. In octal the valid digits are 0-7 with 8
and 9 outside of the octal range.
Bob