In the past, I was worried about 01 11 when I was in for I. I checked a seq and found that there were other features.
The seq command is used to print a string of ordered numbers. It consists of the following three parameters:
-F,-format = FORMAT
Use printf style floating-point FORMAT (default: % g)
-F: Specifies the print format:
For example:
[Root @ hao32] # seq-f % 05g 2 7
00002
00003
00004
00005
00006
00007
-S,-separator = STRING
Use STRING to separate numbers (default: \ n)
-S: the default Delimiter is carriage return:
For example:
[Root @ hao32] # seq-s "2 7
2 3 4 5 6 7
-W,-equal-width
Equalize width by padding with leading zeroes
-W outputs are supplemented with "0" when the front of the same width is insufficient, that is, they are aligned with the maximum number of digits.
For example:
[Root @ hao32] # seq-w 2 11
02
03
04
05
06
07
08
09
10
11