Re: need ability to tell if array is associative or not - bug?
From:
Greg Wooledge
Subject:
Re: need ability to tell if array is associative or not - bug?
Date:
Fri, 29 Aug 2014 10:20:40 -0400
User-agent:
Mutt/1.4.2.3i
On Fri, Aug 29, 2014 at 03:07:40PM +0100, Jason Vas Dias wrote:
> There seems to be no way of testing if an array variable is associative or not
$ unset a b; declare -A a; a[1]=foo; b=(an array); declare -p a b
declare -A a='([1]="foo" )'
declare -a b='([0]="an" [1]="array")'