[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] declare -i
From: |
Greg Wooledge |
Subject: |
Re: [Help-bash] declare -i |
Date: |
Wed, 9 May 2012 15:49:44 -0400 |
User-agent: |
Mutt/1.4.2.3i |
On Wed, May 09, 2012 at 01:39:43PM -0600, Bill Gradwohl wrote:
> > > unset intArray
> > > declare -i -a intArray
> > > intArray=(' 5' ' 2 ' 1 ' -19 ' 'xyz')
> > > declare -i -a
> > > Outputs:
> > > declare -ai intArray='([0]="5" [1]="2" [2]="1" [3]="-19" [4]="0")'
You're aware of this issue, right?
imadev:~$ unset intArray
imadev:~$ declare -i -a intArray
imadev:~$ xyz=42
imadev:~$ intArray=(5 2 1 -19 xyz)
imadev:~$ declare -i -a
declare -ai intArray='([0]="5" [1]="2" [2]="1" [3]="-19" [4]="42")'
Just making sure.
- [Help-bash] declare -i, Bill Gradwohl, 2012/05/08
- Re: [Help-bash] declare -i, Dan Douglas, 2012/05/09
- Re: [Help-bash] declare -i, Bill Gradwohl, 2012/05/09
- Re: [Help-bash] declare -i, Bill Gradwohl, 2012/05/09
- Re: [Help-bash] declare -i, Chet Ramey, 2012/05/09
- Re: [Help-bash] declare -i, Bill Gradwohl, 2012/05/09
- Re: [Help-bash] declare -i,
Greg Wooledge <=
- Re: [Help-bash] declare -i, Bill Gradwohl, 2012/05/09
- Re: [Help-bash] declare -i, DJ Mills, 2012/05/09
- Re: [Help-bash] declare -i, Greg Wooledge, 2012/05/09
- Re: [Help-bash] declare -i, Chet Ramey, 2012/05/09
- Re: [Help-bash] declare -i, Bill Gradwohl, 2012/05/09
- Re: [Help-bash] declare -i, Dan Douglas, 2012/05/09
- Re: [Help-bash] declare -i, Greg Wooledge, 2012/05/10
- Re: [Help-bash] declare -i, Bill Gradwohl, 2012/05/10
- Re: [Help-bash] declare -i, Chet Ramey, 2012/05/10
- Re: [Help-bash] declare -i, Greg Wooledge, 2012/05/10