Very simple bash problem. I have an array that look like:
my_array=(1 2 3)
However, when I print the array or loop through it, bash only refers to the first element.
echo $my_array
1
for element in my_array ; do
echo $element
done
1
How can I access all the elements?