[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Non-empty associative array considered not-set by -v test
From: |
Eduardo Bustamante |
Subject: |
Re: Non-empty associative array considered not-set by -v test |
Date: |
Sat, 27 May 2017 22:34:33 -0500 |
On Sat, May 27, 2017 at 2:07 PM, 林博仁 <buo.ren.lin@gmail.com> wrote:
[...]
Please read the discussions in
https://lists.gnu.org/archive/html/bug-bash/2016-06/msg00067.html and
https://lists.gnu.org/archive/html/bug-bash/2014-11/msg00099.html
When you use an associative array without an explicit subscript, it'll
refer to the element with key '0':
$ declare -A AA=(['0']=zero ['1']=one); echo "$AA"
zero
$ declare -A AA=(['1']=one); echo "$AA"
*empty*