summaryrefslogtreecommitdiff
path: root/keycount
blob: 15b40952997bce6bfaeb39416f2cb47d82c8c680 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env ruby

h = {}
h.default = 0 
while line = STDIN.gets
  line.strip! 
  h[line] += 1
end

h.each_pair {|k,v| puts "#{k} #{v}"}