On Mon, Feb 21, 2011 at 11:13 AM, Marcel de Reuver <mar...@de.reuver.org>wrote:
> In a bash script I use: $[`date --date='this week' +'%V'`%2] to see if > the week number is even. > Only in week 08 the error is: bash: 08: value too great for base > (error token is "08") the same in week 09, all others are Ok... > > GNU bash, version 3.2.39(1)-release (i486-pc-linux-gnu) > Copyright (C) 2007 Free Software Foundation, Inc. > > Running Ubutu 2.6.24-28 server > > This is a feature, numbers with a leading 0 are interpreted as octal. also $[ ] is deprecated, prefer $(( ))