James,

First, I thank you and the GNU team for being prompt and for being at
the top of the issues. Second new line is a non printable character and
users will not always remember that. By reading the description I
thought new line counts are printed separately not included in character
counts (probably it is my limitation of understanding or probably I was
focused on option description so, misinterpreted it). Anyway, my
interpretation would be something like bellow:

-m, --chars
              print the character counts (note: counts will also
includes not printable charaters)

or add examples that I saw in the one of the GNU posting i.e.

echo "1234" | wc -m prints 5
echo -n "1234" | wc -m prints 4

Thanks again,
Syed


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of James Youngman
Sent: Friday, July 04, 2008 3:38 AM
To: Hossain, Syed
Cc: Bob Proulx; bug-coreutils@gnu.org
Subject: Re: wc -m count is wrong

On Thu, Jul 3, 2008 at 8:27 PM, Hossain, Syed <[EMAIL PROTECTED]>
wrote:
> Bob
>
> Thanks for getting back to me promptly. I can understand now why wc
> increasing it by one but it is obviously, the explanation you gave me
> should be documented in man page or info page, agreed? Thanks.

How should we change the wc manual page, then?    Currently it says:

NAME
       wc - print newline, word, and byte counts for each file

SYNOPSIS
       wc [OPTION]... [FILE]...
       wc [OPTION]... --files0-from=F

DESCRIPTION
       Print newline, word, and byte counts for each FILE, and a total
line if
       more than one FILE is specified.  With no FILE, or when FILE is
-, read
       standard input.

       -c, --bytes
              print the byte counts


Personally, I find this quite clear; newlines are bytes too.  But,
what change do you propose?

James.


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to