Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 7cfc4be298
Fetching contributors…

Cannot retrieve contributors at this time

14 lines (12 sloc) 0.248 kB
# word occurrence listing
# usege: ruby occur2.rb file..
freq = {}
ARGF.each_line do |line|
for word in line.split(/\W+/)
freq[word] ||= 0
freq[word] += 1
end
end
for word in freq.keys.sort
printf("%s -- %d\n", word, freq[word])
end
Jump to Line
Something went wrong with that request. Please try again.