On 1/23/17 9:04 AM, admn ombres wrote: > $ x=(x); echo ${#x[@]}; shopt -s nullglob; unset x[0]; echo ${#x[@]} > 1 > 1 > $ x=(x); echo ${#x[@]}; shopt -u nullglob; unset x[0]; echo ${#x[@]} > 1 > 0
`unset' is a builtin; its arguments are subject to all the shell word expansions, including globbing. If you don't want to take a chance on the effects of globbing modifying the word, quote it. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/