bug#70860: Add an option to remove filenames for wc util

Paul Eggert <[email protected]> Fri, 17 Apr 2026 09:46:07 -0700
Newsgroups gmane.comp.gnu.core-utils.bugs
Organization UCLA Computer Science Department
Message-ID <[email protected]>
On 2026-04-17 06:23, Laurent Lyaudet wrote:
> My patch works, it adds a needed feature

It's not clear that the feature is all that needed for shell scripts, 
given that one can write something like this:

   for file in *; do
     lines=$(wc -l <"$file") &&
     printf '"%s" contains %d lines\n' "$file" $lines
   done

where you can substitute whatever command you like for the printf command.

If the feature were needed we could indeed add it, but given the 
relative lack of need it could well be better to leave wc alone. There 
is a nonzero cost to support unnecessary features.

I write this email in the hope that others can see this approach to the 
original problem.