Red Hat Bugzilla – Bug 166546
"total" line for "max line length" is badly labelled
Last modified: 2007-11-30 17:11:12 EST
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_-_*
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Tricky to fix since only the one line heading is given for both "total"-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.
I think this is wrong.
Why? Because the documentation would not need changing if the word "total" was
corrected to "max".
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