summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2017-08-10 18:49:53 +1200
committerDavid Phillips <david@sighup.nz>2017-08-10 18:49:53 +1200
commit23ff0a285b7dd1bdf7ba35987d46756db7b3103b (patch)
treec3d36f53538473b8893c31b03c146650a4929626
parent6862f27687a497aa559746b22173f2a02f1210a7 (diff)
downloadodds-and-ends-23ff0a285b7dd1bdf7ba35987d46756db7b3103b.tar.xz
Add script for cheating at the Countdown gameshow
-rwxr-xr-xwords-misc/countdown.sh11
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