I’m trying to generate a huge list of sequenced numbers with 0 padding
for example:
00000000
00000001
00000002
.
.
99999997
99999998
99999999
im trying something like:
for i in $(seq 00000000 99999999);do echo ${i} >> filelist.txt;done
this has two problems.
1: the range is too big and the system cant handle it
2: the numbers arent padded so I end up with something like this:
1
2
3
.
.
998
999
1000
Any help would be greatly appreciated..
seqalready knows how to do padding.There’s also
-ffor more general formats (mostly useful when the increment isn’t an integer). For more complex output, the best solution would be to postprocess the output ofseqwithsedor other text processing tools.