seq comes with the -f option, allowing us to specify a printf(3) format string.
For example, to zero pad seq output (five zeros):
|
1 2 3 4 5 6 7 8 9 10 11 |
$ seq -f %05g 1 10 00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 |
See: seq(1) printf(3)