Skip to content

Instantly share code, notes, and snippets.

@psy0rz
Created June 13, 2012 08:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save psy0rz/2922915 to your computer and use it in GitHub Desktop.
Save psy0rz/2922915 to your computer and use it in GitHub Desktop.
[root@cursus ~]# cat raad
#!/bin/bash
(( GETAL= $RANDOM % 10 ))
while true; do
echo -n "Raad het getal onder te 10: "
read RAAD
if [ $GETAL -gt $RAAD ]; then
echo "Mijn getal is groter"
fi
if [ $GETAL -lt $RAAD ]; then
echo "Mijn getal is kleiner"
fi
if [ $GETAL -eq $RAAD ]; then
echo "het is goed!!"
exit
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment