html tool

2024年4月26日星期五

整数序列生成seq

参考:https://blog.csdn.net/sjin_1314/article/details/7980991

seq x y 生成x~y之间的整数序列

eg:

# seq 10 15

10

11

12

13

14

15


可以指定位数和不足位时补充0
eg:
# seq -f ta"%2g" 1 15
ta 1
ta 2
ta 3
ta 4
ta 5
ta 6
ta 7
ta 8
ta 9
ta10
ta11
ta12
ta13
ta14
ta15

# seq -f ta"%02g" 1 15
ta01
ta02
ta03
ta04
ta05
ta06
ta07
ta08
ta09
ta10
ta11
ta12
ta13
ta14
ta15


没有评论:

发表评论