Skip to content

Loops

For Loops

#!/usr/bin/env bash
for i in 1 2 3 4 5
do
    echo "Doing $i now"
done
#!/usr/bin/env bash
for i in {1..10}
do
    echo "Doing $i now"
done
#!/usr/bin/env bash
for i in {1..10..2}
do
    echo "Doing $i now"
done

Source