Re: Strange bug in arithmetic function

2011-02-22 Thread jellybean stonerfish
On Mon, 21 Feb 2011 10:13:54 +0100, Marcel de Reuver 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... > >

Re: Strange bug in arithmetic function

2011-02-22 Thread Chris Jones
On Mon, Feb 21, 2011 at 04:13:54AM EST, Marcel de Reuver 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...

Re: Strange bug in arithmetic function

2011-02-22 Thread Eric Blake
On 02/21/2011 02:13 AM, Marcel de Reuver 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... 08 is an invalid

Re: Strange bug in arithmetic function

2011-02-22 Thread Pierre Gaston
On Mon, Feb 21, 2011 at 11:13 AM, Marcel de Reuver 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

Re: Strange bug in arithmetic function

2011-02-22 Thread Davide Brini
On Monday 21 Feb 2011 09:13:54 Marcel de Reuver 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... It's not a