Skip to content

Instantly share code, notes, and snippets.

@hypevhs
Created May 11, 2022 18:25
Show Gist options
  • Save hypevhs/74e0ddd3974635f430f59b3e0befad2b to your computer and use it in GitHub Desktop.
Save hypevhs/74e0ddd3974635f430f59b3e0befad2b to your computer and use it in GitHub Desktop.
fun dict tricks
# use dict(1) to find all words or hyphenated terms that have all of 'aeiou' as vowels, only once each, and in that order, then output a table sorted by length descending then alphabetically descending.
dict -sre --formatted -m '^[^ _aeiou]*a[^ _aeiou]*e[^ _aeiou]*i[^ _aeiou]*o[^ _aeiou]*u[^ _aeiou]*$' | grep -Pv '^$' | awk -F$'\t' '{ print length($4) "\t" $4 "\t" $3; }' | sort -r -n | column -t -s$'\t'
# OUTPUT:
# 15 transgressiouns wik
# 15 transgressionum wik
# 14 transtendinous wik
# 14 transgressioun wik
# [ ... ]
# 7 ajeitou wik
# 7 aerious wik
# 7 aceitou wik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment