1

I want to counting lines without comments.

cat `find linux-4.10.2 -name "*.c" -print` | wc -l

This counting lines in .c files

cpp -fpreprocessed -dD -P fork.c

This remove comments

grep "^\s*$" fork.c

This counting empty lines

How to write the command to count lines of code and empty the lines?

4

1 に答える 1