Thanks Guys
This really helped
Thanks Guys
This really helped
I don't know how many numbers you want to generate, but here is an example for 789-800:
a="00789"
l=${#a}
while [ $a -le 800 ]; do printf "%0${l}d\n" $(( a++ )); done
You should probably post your script first, but...
echo '00789' | awk '{printf("%05d\n", $1+1)}'
Thanks guys . This really helped . Thanks a lot .
Why did you remove the contents of the original post? Now no one will know what was this code's purpose...
bash has a builtin that is a sequence generator:
play with this:
echo {00800..00900}
echo {1,2,3}
echo {1,2,3}{1,2,3}
echo {A..Z}
So,
for i in {nn..mm}
do
# do something with i;
echo $i
done