unixowe-systemy-operacyjne/2023.05.22_zajęcia_asynchroniczne/guess.sh
2023-05-29 17:49:04 +02:00

19 lines
240 B
Bash
Executable File

echo "Guess game. What is the number I'm thinking about?"
num=$(($(($RANDOM % 20))+1))
ex=1
while [ 1 -eq $ex ]
do
read usr
if [ $num == $usr ]
then
echo "Great it is $num"
ex=0
else
echo "No, it is not that number"
fi
done