~kris/dots

srice

ref: a71a43ca650266b35ee4946352b54d8f7365fda7 srice/.local/bin/crossword -rwxr-xr-x 221 bytes
a71a43ca — Kris Yotam profile: export ENV so interactive mksh loads ~/.mkshrc 3 months ago
                                                                                
1
2
3
4
5
6
#!/usr/bin/env bash
# crossword -- pattern match, _ = unknown letter
# Usage: crossword "c_t" -> cat, cot, cut, ...
pattern="${1:?Usage: crossword 'c_t'}"
regex="^${pattern//_/.}$"
grep -ix "$regex" /usr/share/dict/words