seq命令
seq命令用于产生从某个数到另外一个数之间的所有整数。
seq [选项]... 尾数
seq [选项]... 首数 尾数
seq [选项]... 首数 增量 尾数
NAME
seq - print a sequence of numbers打印出一个数字序列
SYNOPSIS大纲
seq [OPTION]... LAST
seq [OPTION]... FIRST LAST
seq [OPTION]... FIRST INCREMENT LAST
DESCRIPTION
Print numbers from FIRST to LAST, in steps of INCREMENT.
Mandatory arguments to long options are mandatory for short options too.
-f, --format=FORMAT
use printf style floating-point FORMAT使用printf样式的浮点格式
-s, --separator=STRING
use STRING to separate numbers (default: \n)使用制定字符串分隔数字 默认是用\n
-w, --equal-width
equalize width by padding with leading zeroes 在列前面添加0使得宽度相同
--help display this help and exit
--version
output version information and exit
#seq -f"%3g" 9 11
9
10
11
#sed -f"%03g" 9 11
#seq -f"str%03g" 9 11
str009
str010
str011
seq -w 98 101
098
099
100
101
seq -s" " -f"str%03g" 9 11
str009 str010 str011