Skip to content

Instantly share code, notes, and snippets.

@defektive
Created September 1, 2016 14:00
Show Gist options
  • Save defektive/540f1f84360d37e0903044613dae7967 to your computer and use it in GitHub Desktop.
Save defektive/540f1f84360d37e0903044613dae7967 to your computer and use it in GitHub Desktop.
#! /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