Lawrence Velázquez <v...@larryv.me> writes: > Did you mean to say that ${#FOO[*]} causes an error? Because > ${FOO[*]} does not, a la $*:
The case that matters for me is the Bash that ships with "Oracle Linux". Which turns out to be version 4.2.46(2) from 2011, which is a lot older than I would expect. But it *does* cause an error in that verison: $ ( set -u ; FOO=() ; echo "${FOO[@]}" ) bash: FOO[@]: unbound variable $ bash -uc ': "${FOO[*]}"' bash: FOO[*]: unbound variable $ > Like ${FOO[*]}, ${FOO[@]} and $@ are exempt from ''set -u''. It looks like that's a change since 4.2.46. Is there text in the manual page about that? Dale