diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-07-08 12:44:18 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-07-08 12:44:18 +1200 |
commit | 19d99fbe07939ec857a0abf14e51674d8c3a6c06 (patch) | |
tree | d0d2889f2c07749d68cd919d56faabbc13514893 /games | |
parent | Incremental improvement to syl heuristic (diff) | |
download | dotfiles-19d99fbe07939ec857a0abf14e51674d8c3a6c06.tar.gz dotfiles-19d99fbe07939ec857a0abf14e51674d8c3a6c06.zip |
Add wrdl to games
No manual page yet
Diffstat (limited to 'games')
-rwxr-xr-x | games/wrdl | 10 |
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:]' |