Files
boggler/filter_prefix.sh
T
cblanken b816054fb3 Check word prefixes to reduce problem space
Produce a prefix wordlist from a dictionary wordlist using the
`filter_prefix.sh` script.
2021-12-28 22:58:18 -05:00

10 lines
186 B
Bash
Executable File

#!/bin/sh
if [ -z $1 ] || [ -z $2 ]; then
echo "Usage: ./filter_prefix.sh WORDLIST PREFIX_LENGTH"
exit 0
else
cat "$1" | pcregrep -o1 "^([a-zA-Z]{$2})" | uniq
exit 0
fi