~kris/dots

srice

ref: b42b72dc2648499470b89418ac629e40f41d3149 srice/.local/bin/crossword -rwxr-xr-x 221 bytes
b42b72dc — Kris Yotam sb-battery: match macsmc-battery by type, add low-battery dunst alerts; xprofile: caps:super 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