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.



Published

03 July 2013

Category

operation

Tags