shell while
shell while
实例
判断数字大小或条件
//这里提前定义了num1和num2
num1=1;
num2=3;
while (($num1 ==0)) | (($num2==3)) ;
do if [ $a -eq 1 ];then
sleep 1;
echo "$a";
fi;
done
//这里提前定义了num1和num2
num1=1;
num2=3;
while (($num1 ==0)) | (($num2==3)) ;
do if [ $a -eq 1 ];then
sleep 1;
echo "$a";
fi;
done