Shell脚本之无限循环的两种方法
摘要:for实现:复制代码代码如下:#!/bin/bashseti=0setj=0for((i=0;i
for 实现:
复制代码 代码如下:
#!/bin/bash
set i=0
set j=0
for((i=0;i<10;))
do
let "j=j+1"
echo "-------------j is $j -------------------"
done
while实现:
复制代码 代码如下:
#!/bin/bash
set j=2
while true
do
let "j=j+1"
echo "----------j is $j--------------"
done
【Shell脚本之无限循环的两种方法】相关文章:
上一篇:
shell脚本中取消重定向的方法实例
下一篇:
Shell脚本遍历一个日期范围实例