Skip to content

Instantly share code, notes, and snippets.

@atoponce
Created January 20, 2022 14:54
Show Gist options
  • Save atoponce/b21fe44f38e1a7ab13e9a213598fe5fb to your computer and use it in GitHub Desktop.
Save atoponce/b21fe44f38e1a7ab13e9a213598fe5fb to your computer and use it in GitHub Desktop.
Candidate absurdle starting words
#!/bin/bash
results=()
words='/usr/share/dict/american-english-insane'
results+=($(grep -P '^(?=.*a.*)(?=.*e.*)(?=.*i.*)(?=.*o.*)[a-z]{5}$' "$words"))
results+=($(grep -P '^(?=.*a.*)(?=.*e.*)(?=.*i.*)(?=.*u.*)[a-z]{5}$' "$words"))
results+=($(grep -P '^(?=.*a.*)(?=.*e.*)(?=.*i.*)(?=.*y.*)[a-z]{5}$' "$words"))
results+=($(grep -P '^(?=.*a.*)(?=.*e.*)(?=.*o.*)(?=.*u.*)[a-z]{5}$' "$words"))
results+=($(grep -P '^(?=.*a.*)(?=.*e.*)(?=.*o.*)(?=.*y.*)[a-z]{5}$' "$words"))
results+=($(grep -P '^(?=.*a.*)(?=.*i.*)(?=.*o.*)(?=.*u.*)[a-z]{5}$' "$words"))
results+=($(grep -P '^(?=.*a.*)(?=.*i.*)(?=.*o.*)(?=.*y.*)[a-z]{5}$' "$words"))
results+=($(grep -P '^(?=.*a.*)(?=.*i.*)(?=.*u.*)(?=.*y.*)[a-z]{5}$' "$words"))
results+=($(grep -P '^(?=.*a.*)(?=.*o.*)(?=.*u.*)(?=.*y.*)[a-z]{5}$' "$words"))
echo ${results[@]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment