[Linux] shell脚本while无限循环的写法
2020-06-25 本文已影响0人
V_Jan
shell里有for, 也有while, 如果要做测试,可以简单的用while: 写一个无限循环:
while :
do
echo "building"
// if some criteria
// exit 0 //success
//or
// exit 1 //fail
done
shell里有for, 也有while, 如果要做测试,可以简单的用while: 写一个无限循环:
while :
do
echo "building"
// if some criteria
// exit 0 //success
//or
// exit 1 //fail
done