shell语言下的for循环

来源:互联网 发布:上杭县广电网络分公司 编辑:程序博客网 时间:2024/06/05 16:15

 直接写吧:

#!/bin/shfor i in $(seq 1 10000);do {   sleep 1;   # shell command    echo ".........$i........" ;}; done
运行结果如下:

.........1.................2.................3.................4.................5........

ctrl+c 中断输出!

原创粉丝点击