Skip to content

Instantly share code, notes, and snippets.

@larshei
Last active September 18, 2020 12:57
Show Gist options
  • Select an option

  • Save larshei/6647716e3e38210b2b6896784f095253 to your computer and use it in GitHub Desktop.

Select an option

Save larshei/6647716e3e38210b2b6896784f095253 to your computer and use it in GitHub Desktop.
#!/bin/bash
# search pattern in linux/mac dictionary. Store findings to file.
word_endings=(
".*kee"
".*key"
".*ky"
".*que"
".*ki"
".*qui"
)
touch word_list
echo "Word List" > word_list
for ending in "${word_endings[@]}"; do
echo "# $ending" >> word_list
grep -w "$ending" /usr/share/dict/words >> word_list
echo "" >> word_list
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment