Machine Type: i486-pc-linux-gnu
Bash Version: 3.1
Patch Level: 17
Release Status: release
Description:
If the IFS does not contain a blank, copying an array using
("${array[@]}") works, but creating a sub-array using
("${array[@]:offset:length}") does not work.
Repeat-By:
IFS=$'\n'
a=(A B C D)
b=("${a[@]}")
echo "${#b[@]}", "${b[@]}" # 4, A B C D -- OK
b=("${a[@]:2}")
echo "${#b[@]}", "${b[@]}" # 1, C D -- bug, should be 2, C D