The SEQ command is used to generate all integers from one number to another.
Grammar
seq [Options] ... Mantissa seq [Options] ... First number of mantissa seq [options] ... First number increment Mantissa
Options
-f Specify format, format output with printf style -S Use the specified string to separate numbers (by default: \ n)-W completion, add 0 to the column before the columns are the same width
Instance
-F Specify format
[[Email protected] ~] # 010203
% previous specified string
[[Email protected] ~] # seq-f "num%02g" 4 6 num04num05num06
-W Output Digital same width
[[Email protected] ~] # seq-w01020304050607080910
[[Email protected] ~] # seq-w 0000050100
-S Specify delimiter (default is carriage return)
[[Email protected] ~] # seq-s "-" Ten1-2-3-4-5-6-7-8-9-10
Paired with
[[Email protected] ~] # seq-s "--"-F "stu%03g" 5stu001-->stu002-->stu003-->stu004-->stu005
Script instance
1, the new 15 users, the user name format is stdxx, where xx from 01-15
# !/bin/bash for in ' seq-f'stu%02g ' useradd $idone
Linux command--seq