SEQ command: Used to produce an integer that counts to another number
Example 1:
[[email protected] 0702]# SEQ 1 5
1
2
3
4
5
[[email protected] 0702]# SEQ 5
1
2
3
4
5
The result of SEQ 1 5 and SEQ 5 is the same, and the default starting value is set from 1.
Example 2: Generating a set of integers between 7 and 30 with an interval of 3
[[email protected] 0702]# SEQ 7 3 30
7
10
13
16
19
22
25
28
Example 3:
-W output is the same width, less than 0 fill
[Email protected] 0702]# SEQ-W 8 13
08
09
10
11
12
13
Example 4:
-f Specifies the output format
[[email protected] 0702]# seq-f "str%03g" 8 13
str008
str009
str010
str011
str012
str013
% preceded by the specified string str,% the number of additions and digits, with a "0" supplement (the default is a space) is 3 bits
Example 5:
-s Specifies that the delimiter is carriage return by default
[[email protected] 0702]# seq-s ""-F "str%03g" 8 13
str008 str009 str010 str011 str012 str013
Use tabs to make delimiters
[[email protected] 0702]# seq-s "' Echo-e" \ T "'" 8 13
8913
This article is from the "Fish" blog, so be sure to keep this source http://pastfish.blog.51cto.com/3585387/1433775