On Wed, 4 Nov 2009, Eric Blake wrote:
> According to Greg Wooledge on 11/4/2009 6:23 AM:
> > On the other hand, removing a single leading zero is not difficult:
> >
> > month=$(date +%m) month=${month#0} # Removing leading 0
>
> Not portable. Assigning the same variable twice in the same sta
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Greg Wooledge on 11/4/2009 6:23 AM:
> On the other hand, removing a single leading zero is not difficult:
>
> month=$(date +%m) month=${month#0} # Removing leading 0
Not portable. Assigning the same variable twice in the same statem
On Tue, Nov 03, 2009 at 05:37:45PM -0700, Bob Proulx wrote:
> Dobromir Romankiewicz wrote:
> > bash: 0008: value too great for base (error token is "0008").
> Numbers with leading zeros are read as octal constants. Octal is
> composed of '0' through '7
Bash Version: 3.2
Patch Level: 39
Release Status: release
Description:
[
Well... Just paste those functions into your text konsole, and compare to my
results:
:1() { x1=0; x2=0; x3=0; x4=7
echo $[$x1$x2$x3$x4]
}
The result is 7.
And run this code:
:2() { x1=0; x2=0; x3=0; x4=8
echo $[$x1$x2$
Dobromir Romankiewicz wrote:
> And run this code:
> :2() { x1=0; x2=0; x3=0; x4=8
> echo $[$x1$x2$x3$x4]
> }
> It crashes with message:
> bash: 0008: value too great for base (error token is "0008").
Thank you for the report. But you have run into Bash FAQ E8.
Nu