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