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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6356 in the body.
You can then email your comments to 6356 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#6356; Package coreutils. (Sat, 05 Jun 2010 16:34:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Peng Yu <pengyu.ut <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Sat, 05 Jun 2010 16:34:02 GMT) Full text and rfc822 format available.

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

From: Peng Yu <pengyu.ut <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: How to avoid showing the 'total' line with wc -l?
Date: Sat, 5 Jun 2010 11:33:50 -0500
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?

-- 
Regards,
Peng




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#6356; Package coreutils. (Sat, 05 Jun 2010 17:54:02 GMT) Full text and rfc822 format available.

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.




bug closed, send any further explanations to 6356 <at> debbugs.gnu.org and Peng Yu <pengyu.ut <at> gmail.com> Request was from Jim Meyering <jim <at> meyering.net> to control <at> debbugs.gnu.org. (Mon, 25 Jul 2011 15:20:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 23 Aug 2011 11:24:03 GMT) Full text and rfc822 format available.

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

Previous Next


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