help-bash
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]