Created
August 20, 2014 15:10
-
-
Save apg/c2d9b8b89eed4e9a92bb to your computer and use it in GitHub Desktop.
How many lines a day do you write?
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
# This inflates things pretty horribly since it's looking at | |
# raw lines (including comments, documentation, etc) rather | |
# than lines of code metrics that you might get from a tool | |
# like sloccount, or cloc | |
AUTHOR=apg | |
for n in {1..100}; do | |
PAGER=cat git log --numstat --since="$n days ago" --until="$(expr $n - 1) days ago" --author=$AUTHOR | grep '^[0-9]' | awk 'BEGIN { lines = 0 } { lines += ($1 - $2) } END { print lines }' | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment