bug#81405: wc: mention character counts in titles

Pádraig Brady <[email protected]> Tue, 14 Jul 2026 17:35:08 +0100
Newsgroups gmane.comp.gnu.core-utils.bugs
Message-ID <[email protected]>
On 13/07/2026 23:07, Collin Funk wrote:
> Pádraig Brady <[email protected]> writes:
> 
>> On 13/07/2026 18:55, Collin Funk wrote:
>>> Pádraig Brady <[email protected]> writes:
>>>
>>>> On 13/07/2026 01:20, Dan Jacobson wrote:
>>>>> NAME
>>>>>           wc - print newline, word, and byte counts for each file
>>>>>                                     ^character,
>>>>
>>>> The above was trying to summarize the functionality and default mode.
>>>> If you add character, then you'd probably have to also mention the -L
>>>> functionality, i.e.:
>>>>
>>>> wc - print newline, word, byte, character counts, or maximum line width
>>>>
>>>> It's a bit wordy TBH, so I'm not sure.
>>> I couldn't think of a way to make it not sound wordy either. POSIX
>>> has
>>> this [1]:
>>>      wc - word, line, and byte or character count
>>> But that sounds a little strange to me. I think it is the double
>>> conjunctions, "and" and "or".
>>> Collin
>>> [1]
>>> https://pubs.opengroup.org/onlinepubs/9799919799/utilities/wc.html
>>
>> It's a bit better than what we have,
>> so let's just go with the POSIX wording.
> 
> Applying the following patch makes the lines in the info pages too
> long. Not sure if you have an idea to avoid that.
> 
> diff --git a/doc/coreutils.texi b/doc/coreutils.texi
> index 5cc831f84..8d3f70a35 100644
> --- a/doc/coreutils.texi
> +++ b/doc/coreutils.texi
> @@ -134,7 +134,7 @@
>   * uptime: (coreutils)uptime invocation.         Print uptime and load.
>   * users: (coreutils)users invocation.           Print current user names.
>   * vdir: (coreutils)vdir invocation.             List directories verbosely.
> -* wc: (coreutils)wc invocation.                 Line, word, and byte counts.
> +* wc: (coreutils)wc invocation.                 Line, word, and byte or character counts.
>   * who: (coreutils)who invocation.               Print who is logged in.
>   * whoami: (coreutils)whoami invocation.         Print effective user ID.
>   * yes: (coreutils)yes invocation.               Print a string indefinitely.
> @@ -261,7 +261,7 @@ @node Top
>   
>   Summarizing files
>   
> -* wc invocation::                Print newline, word, and byte counts
> +* wc invocation::                Print newline, word, and byte or charcter counts
>   * sum invocation::               Print checksum and block counts
>   * cksum invocation::             Print CRC checksum and byte counts
>   * md5sum invocation::            Print or check MD5 digests
> diff --git a/man/wc.x b/man/wc.x
> index e1d9b4bf7..6ff1f819d 100644
> --- a/man/wc.x
> +++ b/man/wc.x
> @@ -1,4 +1,4 @@
>   [NAME]
> -wc \- print newline, word, and byte counts for each file
> +wc \- print newline, word, and byte or character counts for each file
>   [DESCRIPTION]
>   .\" Add any additional description here

Ok I pushed a change to be concise where needed,
and more verbose where appropriate.

https://github.com/coreutils/coreutils/commit/a4d74bb6d
marking this as done.

cheers,
Padraig