Last active
November 30, 2015 13:08
-
-
Save bxt/df607e7d529319e50a79 to your computer and use it in GitHub Desktop.
Aufzählreim "Ene mene Miste" als Bash-Skript
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
read -p "Bitte geben Sie die Auswahlen ein:" -r -a CHOICES | |
RHYME="Ene mene Miste, es rappelt in der Kiste, ene mene meck und du bist weg! \"weg\" bist du noch lange nicht, sag mir erst wie alt du bist?" | |
CHOICE=0 | |
function l { | |
for i in $1; do | |
say -v Anna $i | |
echo Der Finger zeigt auf ${CHOICES[$CHOICE]}! | |
let CHOICE=CHOICE+1; | |
if [ $CHOICE -ge ${#CHOICES[@]} ]; then | |
let CHOICE=0; | |
fi | |
done | |
} | |
l "$RHYME" | |
read -p "Bitte geben Sie Ihr Alter ein:" AGE | |
l "`seq 1 $AGE`" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment