bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in 4.4?


From: Grisha Levit
Subject: Re: bug in 4.4?
Date: Thu, 26 Jan 2017 19:53:06 -0500

This seems to be the following change (from CHANGES)


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.

This mirrors the behavior of $@.

On Jan 26, 2017 4:28 PM, "L A Walsh" <bash@tlinx.org> wrote:
If I set bash to complain about uninitialized variables
w/-u, I get inconsistent, and seemingly incorrect behavior:

 echo $BASH_VERSION
4.4.5(1)-release
 set -u
 echo ${undefvar}
bash: undefvar: unbound variable
 echo ${undefvar[@]}
                                    # no message about unbound var
 echo ${undefvar}   
bash: undefvar: unbound variable     # -u is still in effect






reply via email to

[Prev in Thread] Current Thread [Next in Thread]