Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

12 lines (10 sloc) 0.212 kb
#!/bin/env ruby
# reducer
word_count = Hash.new(0)
STDIN.each do |line|
word, count = line.split("\t")
word_count[word] += count.to_i
end
word_count.each do |word, count|
puts [word, count].join("\t")
end
Jump to Line
Something went wrong with that request. Please try again.