seq用于产生从某个数到另外一个数之间的所有整数
例一:
# seq 1 10
结果是1 2 3 4 5 6 7 8 9 10
例二:
#!/bin/bash
for i in `seq 1 10`;
do
echo $i;
done
或者用
for i in $(seq 1 10)
例
seq -s " " 1 10
seq -f %05g 1 10
seq -w 1 10
for i in $(seq 1 20); do touch test$i;done
for i in {1..20}; do touch test$i;done
touch test$(seq 1 20)
原文:
http://bbs.linuxtone.org/thread-175-1-1.html
http://cndefu.blog.163.com/blog/static/593931882010101811202980/