Created
March 11, 2012 07:36
-
-
Save jappy/2015447 to your computer and use it in GitHub Desktop.
unix command to sort works in a text by dictionary order
This file contains hidden or 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 -sc 'A-Za-z' '\n' < filename.txt | sort | uniq | sort -d | |
tr 'A-Z' 'a-z' < filename.txt | tr -sc 'a-z' '\n'| sort | uniq | sort -d | less # normalizes to lowercase first |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment