how to print the contents of an array in bash code example
Example 1: bash display items in array
$ printf '%s\n' "${my_array[@]}"
Example 2: bash print array
echo "${array[*]}"
$ printf '%s\n' "${my_array[@]}"
echo "${array[*]}"