sort FILENAME.txt | uniq -c | sort -nr | cat -n
alias ranking='sort|uniq -c|sort -nr|cat -n'
perl -le 'for(1..100){print int(rand(5))}' | ranking 1 26 0 2 21 2 3 20 1 4 17 3 5 16 4 ls | cut -c1 | ranking 1 39 a 2 7 t 3 7 m 4 6 s 5 6 C 6 5 r 7 4 y 8 4 p 9 4 g 10 4 c 11 3 n 12 3 l 13 2 w 14 2 i 15 2 d 16 1 z ...