Tuesday, April 29, 2008

Calculate the total of lines within all files

Ignoring the SVN directories, calculate the total of lines within all files.

find . -type f -exec wc -l '{}' \; | grep -v '\.svn' | awk 'BEGIN { c = 0 } { c = c + $1 } END { print "Total number of lines: "c }'

--Noel

0 Comments:

Post a Comment

<< Home