Created
March 11, 2012 07:28
-
-
Save jappy/2015427 to your computer and use it in GitHub Desktop.
unix command to count sequences of consonants in a text
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 'a-z' 'A-Z' < filename.txt | tr -sc 'BCDFGHJKLMNPQRSTVWXYZ' '\n' | sort | uniq -c | sort -nr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am not able to get your command to behave similarly. Can you give me an example? Perhaps I am trying it incorrectly.
You should get an output like this, depending on the text:
6029 TH
4972 S
4227 ND
3939 R
3912 N
3843 H
3603 D
3360 T
3273 M
2922 F
2164 W
1778 B
1666 L
1516 C
1265 Y
1164 V
1124 NT
1045 LL
967 G
790 SH