|
From: | Grisha Levit |
Subject: | Re: bug in 4.4? |
Date: | Thu, 26 Jan 2017 19:53:06 -0500 |
a. Using ${a[@]} or ${a[*]} with an array without any assigned elements when
the nounset option is enabled no longer throws an unbound variable error.
If I set bash to complain about uninitialized variables
w/-u, I get inconsistent, and seemingly incorrect behavior:
echo $BASH_VERSION4.4.5(1)-release
set -ubash: undefvar: unbound variable
echo ${undefvar}
echo ${undefvar[@]}# no message about unbound var
echo ${undefvar}bash: undefvar: unbound variable # -u is still in effect
[Prev in Thread] | Current Thread | [Next in Thread] |