Red Hat Bugzilla – Full Text Bug Listing
|Summary:||"total" line for "max line length" is badly labelled|
|Product:||[Fedora] Fedora||Reporter:||Need Real Name <lsof>|
|Component:||coreutils||Assignee:||Tim Waugh <twaugh>|
|Status:||CLOSED WONTFIX||QA Contact:|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2005-09-05 07:42:49 EDT||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
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: Always Steps to Reproduce: x 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 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.