In Bash, how do I count the number of non-blank lines of code in a project?
There's already a program for this on linux called 'wc'.
Just
wc -l *.c
and it gives you the total lines and the lines for each file.