Bash 如果shell脚本中的条件失败,如何返回相同的if语句
除非满足上述条件,否则是否可以将脚本保持在“if语句”状态Bash 如果shell脚本中的条件失败,如何返回相同的if语句,bash,shell,if-statement,Bash,Shell,If Statement,除非满足上述条件,否则是否可以将脚本保持在“if语句”状态 echo "enter the ID" <----------------Point A read var if [ "$var" == "55" ];then <------------Point B echo "good" fi echo“输入ID”A,而条件与中断可使其: while true; do echo "enter the ID" read var
echo "enter the ID" <----------------Point A
read var
if [ "$var" == "55" ];then <------------Point B
echo "good"
fi
echo“输入ID”A,而
条件与中断
可使其:
while true;
do
echo "enter the ID"
read var
if [ "$var" = "55" ];then
echo "good"
break
fi
done
while
条件和中断
会导致:
while true;
do
echo "enter the ID"
read var
if [ "$var" = "55" ];then
echo "good"
break
fi
done
while
条件和中断
会导致:
while true;
do
echo "enter the ID"
read var
if [ "$var" = "55" ];then
echo "good"
break
fi
done
while
条件和中断
会导致:
while true;
do
echo "enter the ID"
read var
if [ "$var" = "55" ];then
echo "good"
break
fi
done
正是我在这里所需要的,感谢我在这里所需要的,感谢我在这里所需要的,感谢我在这里所需要的,谢谢