Bash loop tricks

From Docswiki
Jump to navigation Jump to search

Simple counter loop

for ((i=1; i <= $max ; i++))
do
   echo $i
done

$max can be a number also.