Linux BASH - Control Structures

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