To access the whole array, use
echo "${list[@]}"
Using just $list
is equivalent to ${list[0]}
, i.e. it only shows the first element.
To access the whole array, use
echo "${list[@]}"
Using just $list
is equivalent to ${list[0]}
, i.e. it only shows the first element.