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

Paul Eggert <[email protected]> Fri, 17 Apr 2026 10:24:02 -0700
Newsgroups gmane.comp.gnu.core-utils.bugs
Organization UCLA Computer Science Department
Message-ID <[email protected]>
On 2026-04-17 10:20, Laurent Lyaudet wrote:
>> Not a fair comparison. The fair comparison is:
>>
>> lines=$(wc -ln "$file")
>>
>> versus:
>>
>> lines=$(wc -l <"$file")
>>
> Still not a fair comparison.

Sure it is, in the context of your earlier example.

> A fair comparison can be:
>>>>      for file in "${files[@]}"; do
>>>>        lines=$(wc -l <"$file") &&
>>>>        printf '"%s" contains %d lines\n' "$file" $lines
>>>>      done
> versus:
> lines=$(wc -ln -- "${files[@]}")

Those are not equivalent, so it's not a fair comparison.

At this point I'll let you have the last word; we're not making progress.