Skip to content

Instantly share code, notes, and snippets.

@huseyin
Created February 2, 2016 01:00
Show Gist options
  • Save huseyin/18f458eec76f74300ec8 to your computer and use it in GitHub Desktop.
Save huseyin/18f458eec76f74300ec8 to your computer and use it in GitHub Desktop.
sayitahmin() {
sayi=$RANDOM
while true; do
printf "Tahmin: "; read tahmin
if [ $tahmin -eq $sayi ]; then
echo Doğru tahmin
exit 0
else
echo Yanlış tahmin
fi
done
}
trap sayitahmin 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment