linux -seq

for i in `seq 1 10`;do echo $i;done

1) -w specifies that the output numbers have the same width 

seq -w 98 101

098
099
100
101

2) -s specifies that the delimiter defaults to carriage return   

seq -s '-' 1 3

1-2-3

3) -f option specifies the format default space    

seq -f "%03g" 9 11

009

010

011

The number of digits specified after % is "%g"  by default ,  

"%3g" then the insufficient number of digits is a space seq -f "%3g" 9 11

seq -f 'abc%g' 1 3

abc1

abc2

abc3

 

 

 

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326489790&siteId=291194637