echo "hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh"
while true;do
read int
if [[ $int == 2 ]] ;then
echo "right"
continue
else
echo "out"
break
fi
while true;do
read int
if [[ $int == 2 ]] ;then
echo "right"
continue
else
echo "out"
break
fi
done
一定要注意if [[ $int == 2 ]] ;then [[ and ]]后面前后都要加空格