嗨,伙计们,我要解决的问题是,即使您输入 no,while 循环在这两种情况下都可以工作,如果我输入 yes,第二个问题 echo 你想继续,它会在两种情况下都出现
echo would you like to provide more numbers:
read des
while [ "$des"=="yes" ]; do
echo provide a number please:
read num
let x=3num+$num
echo $x
echo would you like to carry on
read new
if [ "$new"=='no' ]; then
break
fi
done