Via commandlinefu.com

This post is just a personal note. I am sure I will need this command in the future to clean up my wordlists :)

$ cat dirtyfile.txt | awk '{gsub(/[[:punct:]]/,"")}1' | tr A-Z a-z | sed 's/[0-9]*//g' | sed -e 's/ //g' | strings | tr -cs '[:alpha:]' ' ' | sed -e 's/ /\n/g' | tr A-Z a-z | sort -u > cleanfile.txt