loop syntax in Bash

if you wanna loop through from number to another number, bash loop may not be the best choice for you, cause it has lot of differences from the original for loop as you might think of.

1
2
3
4
for i in $(seq $from $to )
do
echo $i
done

where seq is a special function that generate a array, similar with python.


loop syntax in Bash
https://rug.al/2013/2013-07-03-loop-syntax-in-bash/
Author
Rugal Bernstein
Posted on
July 3, 2013
Licensed under