emacs-bug-tracker
[Top][All Lists]
Advanced

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

[Emacs-bug-tracker] bug#9166: closed (wc -m that the resulting number is


From: GNU bug Tracking System
Subject: [Emacs-bug-tracker] bug#9166: closed (wc -m that the resulting number is wrong)
Date: Mon, 25 Jul 2011 12:16:02 +0000

Your message dated Mon, 25 Jul 2011 06:15:44 -0600
with message-id <address@hidden>
and subject line Re: bug#9166: wc -m that the resulting number is wrong
has caused the GNU bug report #9166,
regarding wc -m that the resulting number is wrong
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
9166: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9166
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: wc -m that the resulting number is wrong Date: Sun, 24 Jul 2011 14:58:49 -0700
 
Hi,
 
I am running a RHEL 6 and noticed that when using wc -m that the resulting number is wrong.  for example echo "A" | wc -m yield 2 instead of 1.  Why is this?  Thanks PAUL>


--- End Message ---
--- Begin Message --- Subject: Re: bug#9166: wc -m that the resulting number is wrong Date: Mon, 25 Jul 2011 06:15:44 -0600 User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110621 Fedora/3.1.11-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.11
tag 9166 invalid
thanks

On 07/24/2011 03:58 PM, Paul Ingerson wrote:

for example echo "A" | wc -m yield 2 instead of 1.  Why is this?

Thanks for the report; however, this is not a bug. In your example, echo "A" really did output two characters: A and newline. Try:

echo A | od -tx1z

to see those characters, and try:

printf A | wc -m

to see the difference (since printf does not output a trailing newline).

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


--- End Message ---

reply via email to

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