How do I write a 'for' loop in Bash?

Solution 1:

From this site:

for i in $(seq 1 10);
do
    echo $i
done

Solution 2:

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