[erlang-questions] LOC tool for Erlang

Daniel Luna luna@REDACTED
Wed Mar 5 16:03:43 CET 2008

On Wed, 5 Mar 2008, Convey Christian J NPRI wrote:
> Does anyone know of an open source tool (hopefully without output in 
> English) that counts lines of Erlang code?

grep, wc and find are your friends.

But the answer depends on what you mean with lines of Erlang code.

All lines:

wc -l $(find . -name "*rl")

Lines that are not blank lines or comments:

grep -v '^[[:space:]]*\($\|%\)' $(find . -name "*rl") | wc -l

Daniel Luna                           | Top reasons that I have a beard:
luna@REDACTED                     |  a) Laziness.
http://www.update.uu.se/~luna/        |  b) I can.
Don't look at my homepage (it stinks).|  c) I can get away with it.

More information about the erlang-questions mailing list