Home | Mirror | Search

2. seq - print a sequence of numbers

[neo@test ~]$ seq 10
1
2
3
4
5
6
7
8
9
10
[neo@test ~]$ seq 5 10
5
6
7
8
9
10

		

等差列, 步長設置

$ seq 1 1 10
1
2
3
4
5
6
7
8
9
10

$ seq 1 2 10
1
3
5
7
9

# seq 0 2 10
0
2
4
6
8
10
		

分隔符

# seq -s : -w 1 10
01:02:03:04:05:06:07:08:09:10

# seq -s '|' -w 1 10
01|02|03|04|05|06|07|08|09|10
		

等寬,前導字元用0填充

# seq -w 1 10
01
02
03
04
05
06
07
08
09
10
		
comments powered by Disqus