#!/bin/sh
number=$[$RANDOM/1000]
echo "Guess on a number between 1 and 100"
tries=0
guess=0
echo "$number"
while [ $number != $guess ]; do
echo -n "Your guess: "
read guess
tries=$[$tries+1]
if [ $number -gt $guess ]; then
echo "The number is bigger"
else
echo "The number is smaller"
fi
done
echo "It did take you $tries tries to find the number."