[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: wc -m count is wrong

From: Hossain, Syed
Subject: RE: wc -m count is wrong
Date: Mon, 7 Jul 2008 13:36:22 -0400


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,

-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of James Youngman
Sent: Friday, July 04, 2008 3:38 AM
To: Hossain, Syed
Cc: Bob Proulx; address@hidden
Subject: Re: wc -m count is wrong

On Thu, Jul 3, 2008 at 8:27 PM, Hossain, Syed <address@hidden>
> 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:

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

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

       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?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]