shell练习-----猜数值
#!/usr/bin/env pythona=`echo $RANDOM | cut -c 1,2`
#echo $a /为了验证实验
while :; do
read -p "please input a number: " x
if [ $x == $a ];then
echo "you are right"
break
elif [ $x -gt $a ];then
echo "The number what you input is bigger "
continue
elif [ $x -lt $a ];then
echo "The number what you input is smaller"
continue
fi
done
页:
[1]