for i in 1 2 3 4 5 do {code} done |
for ((i=0; i<=10; i++))
do {code} done |
if [ $i -eq 2 ] then {code} else {code} fi |
if [ $i -eq 2 ] then {code} elif [ $1 -eq 5] then {code} else {code} fi |
while [ i -lt 10 ] do {code} i++ done |
# Note: "while :" creates an endless loop while : do {code} done |
until [ i -eq 10 ] do {code} i++ done |
case "$1" in hello) echo "Hello to you too." ;; goodbye) echo "See ya later." ;; *) echo "Huh? How rude..." ;; esac |