Created
May 27, 2013 19:38
-
-
Save tanema/5658738 to your computer and use it in GitHub Desktop.
Get the number of lines of code by extension, on a git repo.
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
git ls-files | perl -pe "s/.*\.(.*?)\n/\.\1\n/" | awk '/\..*/' | sort | uniq | xargs -n1 -E '\n' -I % sh -c 'git ls-files "*%" | xargs cat | echo "$(wc -l) %"' | sort -rn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment