Quantcast
Viewing all articles
Browse latest Browse all 9

Answer by Delyan Lazarov for Print array elements on separate lines in Bash?

You could use a Bash C Style For Loop to do what you want.

my_array=(one two three)for ((i=0; i < ${#my_array[@]}; i++ )); do echo "${my_array[$i]}"; doneonetwothree

Viewing all articles
Browse latest Browse all 9

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>