Created
September 1, 2016 14:00
-
-
Save defektive/540f1f84360d37e0903044613dae7967 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 | |
user=$1 | |
wordlist=$2 | |
words=`cat $wordlist` | |
say "Okay $user. It's spelling time" | |
for word in $words; do | |
good=0 | |
while [ $good -eq 0 ]; do | |
say "Spell $word" | |
read guess | |
if [ "$guess" == "$word" ]; then | |
good=1 | |
say "correct" | |
else | |
say "Sorry, that is not correct" | |
fi | |
done | |
done | |
say "Good Job $user. Have a good day!" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment