By combining the power of git and bash, we can have in an instant an estimation of lines number in a project.
For instance to count lines number in versionned perl files:
$ git ls-files | egrep ".*(driver|core).*pl$" | xargs wc -lgit ls-fileswill only return files versionned which is a first interesting filter.egrep patternwill allow us to filter precisely a portion of project (by file extension, path, etc.)wc -lwill count lines by file and make the sum.
Found here : http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository
Warning, do not use
grep -ewhich accepts only one pattern per-e.egrepis more useful.
Generate that kind of output :
$ git ls-files | egrep ".*(driver|core).*pl$" | xargs wc -l
1090 cgi-bin/coreOVECC.pl
2460 cgi-bin/driver.pl
3550 total
3550 lines of code in two files, what a pleasure :(