Dec 31st, 2013
Here's a command that was used on a project I worked on that shows the number of lines of custom code and total lines of code in a project:
Custom code
( find -E ./hooks ./scripts ./tests ./docroot/sites/all/drush ./docroot/sites/all/modules/custom ./docroot/sites/all/themes/custom -regex '.*\.(sah|html|php|inc|module|info|js|scss|sh|css|rb)' -print0 | xargs -0 cat ) | wc -l
All code
( find -E . -regex '.*\.(sah|html|php|inc|module|info|js|scss|sh|css|rb)' -print0 | xargs -0 cat ) | wc -l