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.



Reply via email to