Between 17 professional programmers on IRC late one night, I stumbled across not only this problem, but the solution to it as well. The tricky part is that it’s a recursive process. You have to pipe to hell and back!?!? Maybe . . .
this gets you the number of lines in all php files
cat
this one lists all the files and their line counts
wc -l `find . -name \*.php`
Sweet! Battle of the Bits is over 30,000 lines of code! Did I do that?
props to jangler and wollymammoth
Filed under — bash tricks
Tags —
bash, code, file tree, line count, linux, recursive, unix