sort users begining with each letter of the alphabet from greatest to least occurence
hi i was just wondering how to sort users beginning with each letter of the alphabet from greatest to least occurrence?
i have something like this :
sort -t, -k1,2n -k4,5rn /etc/passwd
but how would i specify how to determine which letter of the alphabet is being called?
my output should be something like :
c => 3
b => 2
d => 2
a => 1
z => 0
some help would be much appreciated