diff options
| author | David Phillips <david@sighup.nz> | 2017-08-10 18:49:53 +1200 |
|---|---|---|
| committer | David Phillips <david@sighup.nz> | 2017-08-10 18:49:53 +1200 |
| commit | 23ff0a285b7dd1bdf7ba35987d46756db7b3103b (patch) | |
| tree | c3d36f53538473b8893c31b03c146650a4929626 /words-misc | |
| parent | 6862f27687a497aa559746b22173f2a02f1210a7 (diff) | |
| download | odds-and-ends-23ff0a285b7dd1bdf7ba35987d46756db7b3103b.tar.xz | |
Add script for cheating at the Countdown gameshow
Diffstat (limited to 'words-misc')
| -rwxr-xr-x | words-misc/countdown.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/words-misc/countdown.sh b/words-misc/countdown.sh new file mode 100755 index 0000000..e25be7a --- /dev/null +++ b/words-misc/countdown.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +if [ -x $1 ]; then + echo Syntax: $0 [letters] + exit +fi + +< /usr/share/dict/words ./match_pool $1 | \ + grep 'matches$' | \ + awk '{print length($1)" "$1}' | \ + sort -n |
