I was trying to use sed to count all the lines based on a particular extension.
find -name \'*.m\' -exec wc -l {} \\; | sed ...
I was tryi
Hm, solution with cat may be problematic if you have many files, especially big ones.
Second solution doesn't give total, just lines per file, as I tested.
I'll prefer something like this:
find . -name '*.m' | xargs wc -l | tail -1
This will do the job fast, no matter how many and how big files you have.