🏠 Go back to the homepage How to loop over an array in Bash Find out how to loop over an array in Bash Published May 10 2022 I had an array of 3 strings: list=( "first" "second" "third" ) and I wanted to loop over them in a bash shell script. Here’s how I did it: for i in "${list[@]}" do : echo $i done Download my free Linux Handbook!