examples/doubles.sh
1 #!/bin/sh 2 3 # this script quizzes you on words repeatedly, 4 # to try to get you to map them with their shapes! 5 6 set -e 7 8 read -p "How many letters? " LETTERCOUNT 9 10 DICTFILE=./dict.txt 11 12 SINGLES="$( \ 13 cat $DICTFILE | \ 14 egrep "^.{$LETTERCOUNT}$" | \ 15 shuf -n 20 | \ 16 tr "\n" " " | \ 17 xargs echo \ 18 )" 19 20 for word in $SINGLES; do 21 typie -o /dev/null "$word $word $word" 22 done 23 typie -o /dev/null "$SINGLES" 24 25 echo "All Done! :3" | less 26