Hello all,
(This bug was found on a fresh Debian wheezy install)
Here is the minimal code sample to reproduce the bug (present in version 4.2,
corrected in 4.3 as far as I can tell) :
arr1=( "" "" )
arr2=( "${arr1[@]:1}" )
if [ ${#arr2[@]} -eq 1 ]; then
echo OK
else
echo Not OK
fi
On the buggy Bash version, the second affectation creates an empty array
whereas we expect it to create an array of one empty string.
Oddly enough, the bug is absent from some older Bash versions (3.0 correctly
reported an array of one element, for instance).
Thank you for your time,