iterate through a list bash code example
Example 1: how to loop through every value in array bash
## declare an array variable
declare -a arr=("element1" "element2" "element3")
## now loop through the above array
for i in "${arr[@]}"
do
echo "$i"
# or do whatever with individual element of the array
done
Example 2: bash for loop list
for VARIABLE in var1 var2 var3
do
command1 on $VARIABLE
command2
commandN
done