2021 April

Bash Loops

Examples of various looping scripts using bash Arrays and Counts Loop through an array declare -a myArray=(“Diane” “Jim” “Larry” “Dawn” )for i in “${myArray[@]}”do echo $idone Loop through an incremental count for INDEX in {0..5}; do echo $INDEXdone# one linerfor I in {0..5}; do echo $INDEX; done   For Loops Use these with variables! #… read more »

Sidebar