Created
October 18, 2017 09:42
-
-
Save oieioi/d47ad62c403cd002f86f078532a040d8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def main | |
lines = STDIN.read.split(/\n/) | |
sum = {} | |
lines.each {|line| | |
name = line.match(/\((.+) \d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d/)[1].strip | |
sum[name] = 0 if sum[name].nil? | |
sum[name] = sum[name] + 1 | |
} | |
sum.each {|key, v| | |
puts "#{v} lines added by #{key}" | |
} | |
end | |
main | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
git ls|xargs -Ifile git --no-pager --show-email blame file|ruby ./sum.rb