Created
February 18, 2022 16:26
-
-
Save trescenzi/5a174c3e143aac335ae67a21de27bb9c to your computer and use it in GitHub Desktop.
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/bash | |
read -p "Letters to exclude: " exclude | |
exclude=${exclude:-/\d} | |
read -p "First Letter[.]: " first | |
first=${first:-.} | |
read -p "Second Letter[.]: " second | |
second=${second:-.} | |
read -p "Third Letter[.]: " third | |
third=${third:-.} | |
read -p "Fourth Letter[.]: " fourth | |
fourth=${fourth:-.} | |
read -p "Fifth Letter[.]: " fifth | |
fifth=${fifth:-.} | |
read -p "Anything else? " unknown | |
unknown=${unknown:-(a-z)} | |
words=`grep [^$exclude][^$exclude][^$exclude][^$exclude][^$exclude] $HOME/scripts/5letterwords.txt | grep $first$second$third$fourth$fifth | grep [$unknown]` | |
echo $words |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment