1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env ruby require 'zipf' sum = 0.0 ReadFile.readlines_strip(ARGV[0]).each { |i| sum += i.to_f puts sum }