Re: Non-empty associative array considered not-set by -v test

2017-05-27 Thread 林博仁
Thanks for the explanation. 林博仁

Re: Non-empty associative array considered not-set by -v test

2017-05-27 Thread Eduardo Bustamante
On Sat, May 27, 2017 at 2:07 PM, 林博仁 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

Non-empty associative array considered not-set by -v test

2017-05-27 Thread 林博仁
Hi, please consider the following script: ``` declare -ar indexed_array=(1 2 3) declare -ar indexed_array_null=() declare -Ar associative_array=(\ ["apple"]="1" \ ["banana"]="2" \ ) declare -Ar associative_array_null=() for parameter in indexed_array indexed_array_null associative_array associat