shell script for "for" loop# Unix - 噫吁兮,危乎高哉
b*l
1 楼
In this script:
for i in 1 2 3 4; do echo $i; done
It will print 1 2 3 4. But if I want to loop from 1 to N which is very large,
e.g, 100000, how to do that in bash or ksh using "for" loop? Is there anything
like "for i in 1:10000"? This one does not work.
3x
for i in 1 2 3 4; do echo $i; done
It will print 1 2 3 4. But if I want to loop from 1 to N which is very large,
e.g, 100000, how to do that in bash or ksh using "for" loop? Is there anything
like "for i in 1:10000"? This one does not work.
3x