Bug 166546 - "total" line for "max line length" is badly labelled
Summary: "total" line for "max line length" is badly labelled
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: 4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-08-23 08:18 UTC by Need Real Name
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2005-09-05 11:42:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2005-08-23 08:18:46 UTC
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:
Always

Steps to Reproduce:
x

Additional info:

Comment 1 Tim Waugh 2005-09-05 11:42:49 UTC
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 11:48:42 UTC
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 12:18:51 UTC
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
instance?

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
clear.


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