-
-
Save sayz/790562 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cevir() { | |
local msj=$1 | |
local default=$2 | |
while :; do | |
echo $msj | |
read cevap | |
[ -z "$cevap" ] && cevap=$default | |
case $cevap in | |
[Ee]) return 0;; | |
[Hh]) return 1;; | |
*) echo "ne diyorsun anlamiyorum";; | |
esac | |
done | |
} | |
if cevir "benle misin değil misin iskoçyalı ?" "e"; then | |
echo "nevet" | |
else | |
echo "nayir" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment