Jim Beard wrote:
> I got a shell scripting question for the collective masses. I want
> to know the total number of lines in a programming project I'm
> working on. I figured the fastest way (If I knew the syntax) would
> likely be to type in a big archaic shell script command that would
> concatonate all of the files together then tell me how many lines are
> in the new file. Does anyone know a better way? Does anyone know
> syntax for this task?
$ find . | xargs cat | wc -l
Only do that on a clean source tree. No fair counting lines
of object and executable files. (-:
If some of your filenames have spaces in them, do this instead.
$ find . -print0 | xargs -0 cat | wc -l
--
Bob Miller K<bob>
[EMAIL PROTECTED]
_______________________________________________
EUGLUG mailing list
[email protected]
http://www.euglug.org/mailman/listinfo/euglug