On Fri, 13 Feb 2009, Kevin Ivory wrote:

Hi coreutils team,

wc gives a grand total when analyzing several files.
It would be helpful to have a command line option that
returns only the total. It should be able to combine
with -c/-l/-w to return only the total characters /
total lines / total words.

It's usually preferable to combine the features of several coreutils rather than add new code. In this case the desired result can be obtained with:

$ wc *.txt | tail -n 1
  485  1861 13078 total

If required, this could be wrapped up in a shell script or alias to save typing if used frequently.


Cheers,
Phil


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to