#!/bin/bash
int=15
while :
do
echo -n "输入 0 到 50 之间的数字: "
read aNum
if [ $aNum == $int ]; then
echo "恭喜你猜对了数为:${int}"
break
elif [ $aNum -gt $int ]; then
echo "大了,请重试"
continue
else
echo "小了,请重试"
fi
done