-
-
Save roblogic/e465acabb57c8a83671ed4d02a2d2f5e to your computer and use it in GitHub Desktop.
pattern matcher for doing simon shuker's code-cracker in the nz herald. ".txt" uses data from https://github.com/dolph/dictionary/blob/master/unix-words
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
[ "$1" ] || { echo "pattern?"; exit; } | |
patt="$1" | |
grep -E "^$patt$" *.txt | awk -F: '{print $2}'| sort -u | paste - - - - - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment