#!/bin/bash
sui=$(expr $RANDOM % 100)
ci=0
echo "商品的价格"
while true
do
read -ep "请输入你猜测的价格" cai
let ci++
if [ $cai -eq $sui ]
then
echo "恭喜你猜对了实际价格$sui"
echo "你一共猜了$ci次"
break
elif [ $cai -gt $sui ]
then
echo "太高了"
else
echo "太低了"
fi
done