GNU bug report logs - #61300
wc -c doesn't advance stdin position when it's a regular file

Previous Next

Package: coreutils;

Reported by: Stephane Chazelas <stephane <at> chazelas.org>

Date: Sun, 5 Feb 2023 18:28:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Pádraig Brady <P <at> draigBrady.com>, Stephane Chazelas <stephane <at> chazelas.org>, 61300 <at> debbugs.gnu.org
Subject: bug#61300: wc -c doesn't advance stdin position when it's a regular file
Date: Sun, 5 Feb 2023 12:59:49 -0800
On 2023-02-05 11:59, Pádraig Brady wrote:

> Hopefully the attached addresses this. 

Thanks for fixing that.

> Note it doesn't add the constraint on the input being readable,
> which I'll think a bit more about.

Let's leave that as-is, please. If 'wc' can output the correct value 
without reading its input, POSIX does not require 'wc' to do the read, 
and it seems perverse to modify 'wc' to go to the effort to refuse to 
tell the user useful information that the user requested and that 'wc' 
knows.





This bug report was last modified 2 years and 135 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.