5

How I can count occurence results of list in linux?

a
b
b
c
c
d

Result: a = 1 , b = 2 , c=2 , d=1
kakashy
  • 714
  • 9
  • 24

1 Answers1

13

I solved this by piping to this command

sort | uniq -c 
Boris Verkhovskiy
  • 14,854
  • 11
  • 100
  • 103
kakashy
  • 714
  • 9
  • 24