Search This Blog

Wednesday, March 3, 2010

Counting lines of code



$ find . -name *.java |xargs wc -l


But this counts blank lines and comments as well! Better ideas, anyone?

3 comments:

Abhiram said...

Can't you grep them out or something?

Kashyap said...

http://cloc.sourceforge.net/

also look at the "Other Counters" section on this page.

Prashanth Kamle said...

@Kashyap

Nice tool! Thanks!