Skip to content

Instantly share code, notes, and snippets.

@AndrolGenhald
AndrolGenhald / apg single letter syllable test
Created August 2, 2018 19:53
Test to see how prevalent single letter syllables are in apg's pronounceable 15 character passwords, and specifically how prevalent they are at the end of the password.
apg -m 15 -x 15 -t -M l -n 100000 | cut -f 2 -d ' ' | sed 's/^.//; s/.$//' | sed 's/\(\w\{2,\}\)//g' | grep '[^-]' > /tmp/passwords
echo -n 'Total: '; wc -l </tmp/passwords
echo -n 'Single letter syllable at end: '; grep -c -- '[^-]$' /tmp/passwords
echo -n 'Single letter syllable anywhere else: '; grep -c -- '[^-]-\|[^-]\{2\}$' /tmp/passwords
echo -n 'Single letter syllable at end and no others: '; grep -c -- '^-*[^-]$' /tmp/passwords
rm /tmp/passwords