Created
February 12, 2024 23:56
-
-
Save uilian/7a0f5775bc450080473356b214a6806c to your computer and use it in GitHub Desktop.
McIlroy solution for printing the most common words in a text file in the inverse order of the count of their occurrences
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
tr -cs A-Za-z '\n' | | |
tr A-Z a-z | | |
sort | | |
uniq -c | | |
sort -rn | | |
sed ${1}q |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment