#!/bin/bash ## A basic loop using while counter=1 while [ $counter -le 10 ] do echo $counter counter=$((${counter}+1)) # counter=$(($counter+1)) # this way works too # ((counter++)) # shortcut form for increment by 1 done echo "All done"