|
From: | Philip Rowlands |
Subject: | Re: wc enhancement request: total option |
Date: | Sat, 14 Feb 2009 01:37:26 +0000 (GMT) |
User-agent: | Alpine 1.10 (DEB 962 2008-03-14) |
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 totalIf required, this could be wrapped up in a shell script or alias to save typing if used frequently.
Cheers, Phil
[Prev in Thread] | Current Thread | [Next in Thread] |