print 1 to 100 in a shell script
I need to output the number 1 through 100 in a shell script.
I can't use the c style for loop because the shell (busybox shell) doesn't allow it.
Is there an easy way to do this without typing out all 100 numbers?
I want to use something like:
for i in 1 to 100
do
echo $i
done
rather than
for i in 1 2 3 4 5 ...
do
echo $i
done
Is it possible to do ranges in for loops in regular /bin/sh scripts?
Again, I cannot use c style for loops (for ((a=1; a <=100; a++)))
Thanks
|