~kris/dots

srice

ref: e9b48d06a8541f3eda5c4db90382ab3c77183afb srice/.local/bin/crossword -rwxr-xr-x 221 bytes
e9b48d06 — Kris Yotam xprofile: systemd-aware pipewire start + blueman-applet; sb-internet: tolerate missing /proc/net/wireless 2 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