On 6/1/16 6:19 PM, Grisha Levit wrote: > |$ declare -n ref=XXX[0]; mapfile ref <<< $'1\n2'; declare -p XXX[0] declare > -a XXX[0]=([0]=$'1\n' [1]=$'2\n') | > > maybe makes sense to check for legal identifier before making the array?
Actually, it makes sense to check only for legal identifier instead of allowing array references for variable creation, sinec they should only work for variable assignment. -- ``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/