aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-07-08 12:44:18 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-07-08 12:44:18 +1200
commit19d99fbe07939ec857a0abf14e51674d8c3a6c06 (patch)
treed0d2889f2c07749d68cd919d56faabbc13514893 /games
parentIncremental improvement to syl heuristic (diff)
downloaddotfiles-19d99fbe07939ec857a0abf14e51674d8c3a6c06.tar.gz
dotfiles-19d99fbe07939ec857a0abf14e51674d8c3a6c06.zip
Add wrdl to games
No manual page yet
Diffstat (limited to 'games')
-rwxr-xr-xgames/wrdl10
1 files changed, 10 insertions, 0 deletions
diff --git a/games/wrdl b/games/wrdl
new file mode 100755
index 00000000..2b482514
--- /dev/null
+++ b/games/wrdl
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+cat -- "${@:-/dev/stdin}" |
+while read -r -a ws ; do
+ for w in "${ws[@]}" ; do
+ w=${w%%[^a-zA-Z]*}
+ w=${w##*[^a-zA-Z]}
+ [[ $w ]] || continue
+ printf '%s\n' "$w"
+ done
+done | tr '[:upper:]' '[:lower:]'