On 7/12/15 11:58 PM, Linda Walsh wrote:
>>  set -A hash

This is an error.

>>  hash=([defined_value]=22)

This creates an indexed array.

>>  echo ${hash[defined_value]}
> 22
>>  [[ -v ${hash[defined_value]} ]] && echo pass

test/[/[[ -v didn't understand array variables and subscripts until bash-4.3.

>>  echo $BASH_VERSION
> 4.2.45(1)-release

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to