GNU bug report logs - #6356
How to avoid showing the 'total' line with wc -l?

Previous Next

Package: coreutils;

Reported by: Peng Yu <pengyu.ut <at> gmail.com>

Date: Sat, 5 Jun 2010 16:34:02 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Davide Brini <dave_br <at> gmx.com>
To: bug-coreutils <at> gnu.org
Subject: Re: bug#6356: How to avoid showing the 'total' line with wc -l?
Date: Sat, 5 Jun 2010 18:41:44 +0100
On Saturday 05 June 2010, Peng Yu wrote:

> When I use wc -l *.txt, it show the total number of lines at the end.
> I don't necessary need this last line. Is there a way to disable it?

It's dictated by POSIX. You can try

wc -l *.txt | head -n -1

-- 
D.




This bug report was last modified 13 years and 363 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.