Guest User

Untitled

a guest
Jan 21st, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. cat tim.csv | ruby -e 'STDIN.each { |l| @h ||= {}; n,v = l.split(","); v=v.to_f; @h[n] ? @h[n] += v : @h[n] = v }; @h.each { |n,v| puts "#{n},#{v}" }'
Add Comment
Please, Sign In to add comment