Bug 166546 - "total" line for "max line length" is badly labelled
"total" line for "max line length" is badly labelled
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Depends On:
  Show dependency treegraph
Reported: 2005-08-23 04:18 EDT by Need Real Name
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-05 07:42:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2005-08-23 04:18:46 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050719 Epiphany/1.6.5

Description of problem:
wc -l shows the length of the longest line
the "total" line in the output is mislabelled, since it shows the largest of the line lengths, not the total.

$ wc -L Cory_Doctorow_-_*
  1327 Cory_Doctorow_-_Down_and_Out_in_the_Magic_Kingdom.txt
  1264 Cory_Doctorow_-_Eastern_Standard_Tribe.txt
  1327 total

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

Additional info:
Comment 1 Tim Waugh 2005-09-05 07:42:49 EDT
Tricky to fix since only the one line heading is given for both "total"-types
and "maximum"-types.

This line is also specified to quite a high degree in the documentation, so it
is not something that can easily be changed.  There is a paragraph all about
this particular oddity:

   With the `--max-line-length' option, `wc' prints the length of the
longest line per file, and if there is more than one file it prints the
maximum (not the sum) of those lengths.

So I'm going to close this, since it is consistent with the documented behaviour.
Comment 2 Need Real Name 2005-09-05 07:48:42 EDT
I think this is wrong.

Why? Because the documentation would not need changing if the word "total" was
corrected to "max".
Comment 3 Tim Waugh 2005-09-05 08:18:51 EDT
Well, it would -- read the info page that I took that paragraph from.

What do you think the output from 'wc -l -L *.txt | tail -n1' should be, for

If you want this changed, you'll need to discuss the change with upstream.  This
isn't something we can easily change since the scope of the bug/feature is not

Note You need to log in before you can comment on or make changes to this bug.