From 23ff0a285b7dd1bdf7ba35987d46756db7b3103b Mon Sep 17 00:00:00 2001 From: David Phillips Date: Thu, 10 Aug 2017 18:49:53 +1200 Subject: Add script for cheating at the Countdown gameshow --- words-misc/countdown.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 words-misc/countdown.sh 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 -- cgit v1.1