Tested with shbot in #bash (freenode): 42# set -u; declare -a foo; echo ${#foo[@]} 0 43# set -u; declare -a foo; echo ${#foo[@]} bash: foo: unbound variable 43# set -u; foo=(); echo ${#foo[@]} 0
Is this a bug?
Tested with shbot in #bash (freenode): 42# set -u; declare -a foo; echo ${#foo[@]} 0 43# set -u; declare -a foo; echo ${#foo[@]} bash: foo: unbound variable 43# set -u; foo=(); echo ${#foo[@]} 0
Is this a bug?