, # Basic while loop , counter=1 , while $counter -le 10 , do , echo $counter , ((counter++)) , done , , # Basic until loop , counter=1 , until $counter -gt 10 , do , echo $counter , ((counter++)) , done , echo All done , , # Basic for loop , names=Stan Kyle Cartman , for name in $names , do , echo $name , done , echo All done , , # Using a break statement , for value in $1/* , do , used=$( df $1 | tail -1 | awk { print $5 } | sed s/%// ) , if $used -gt 90 , then , echo Low disk space 1>&2 , break , fi , cp $value $1/backup/ , done ,