Last active
May 22, 2017 12:15
-
-
Save jdmichaud/502cbacaedfee8c7cbbb750a96d92fae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat some_filename | \ # Open the file | |
tr [:blank:] '\n' | \ # transform whitespace into new line | |
tr '[:upper:]' '[:lower:]' | \ # Shift to lower case | |
sed 's/^[[:punct:]]*\([a-z]*\)[[:punct:]]*$/\1/g' | \ # Remove punctuation before and after words | |
grep '^[a-z]*$' | \ # Remove words containing punctuation | |
sort | \ # Sort | |
uniq -c | \ # Count | |
sort -rn | \ # Sort the count | |
less |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment