title: Print array elements on separate lines in Bash?
body: <p>How do I print the array element of a Bash array on separate lines? This one works, but surely there is a better way:</p>
  
  <pre><code>$ my_array=(one two three)
  $ for i in ${my_array[@]}; do echo $i; done
  one
  two
  three
  </code></pre>
  
  <p>Tried this one but it did not work:</p>
  
  <pre><code>$ IFS=$'\n' echo ${my_array[*]}
  one two three
  </code></pre>