EN
Bash - get all array elements
0 points
This article will show you how to get all array elements in Bash.
Quick solution:
xxxxxxxxxx
1
2
3
my_array=(1 two 3 4 five 6)
4
echo ${my_array[@]}
Example output:
xxxxxxxxxx
1
1 two 3 4 five 6
Note:
${my_array[@]}
is an alternative notation to${my_array[*]}
.