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

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

[Emacs-bug-tracker] bug#9019: closed (wc -l bug)


From: GNU bug Tracking System
Subject: [Emacs-bug-tracker] bug#9019: closed (wc -l bug)
Date: Thu, 07 Jul 2011 16:35:01 +0000

Your message dated Thu, 07 Jul 2011 10:34:10 -0600
with message-id <address@hidden>
and subject line Re: bug#9019: wc -l bug
has caused the GNU bug report #9019,
regarding wc -l bug
to be marked as done.

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


-- 
9019: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9019
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: wc -l bug Date: Thu, 7 Jul 2011 12:31:16 +0400

Hello!

I’ve found out that wc –l doen’t count the last line if there is no CR in the end of line

 

Good luck!

 

Andrey Sheyko
ASN/CSN Senior engineer,

Technical Management.

cid:image001.jpg@01C912B5.4AC00AD0

.............................................................................
T M +7 (921) 310 63 63
E address@hidden I www.yota.ru
...............................................................................
This message contains confidential information of Scartel, Ltd. and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately if you have received this message by mistake and erase from your system.

 


--- End Message ---
--- Begin Message --- Subject: Re: bug#9019: wc -l bug Date: Thu, 07 Jul 2011 10:34:10 -0600 User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.10
tag 9019 notabug
thanks

On 07/07/2011 02:31 AM, Andrey Sheyko wrote:
> Hello!
> I've found out that wc -l doen't count the last line if there is no CR in the 
> end of line

Thanks for the report.  However, this is not a bug, but a requirement of
POSIX.  Furthermore, I think you meant NL, not CR.

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/wc.html

"-l
    Write to the standard output the number of <newline> characters in
each input file.
...
Early proposals only specified the results when input files were text
files. The current specification more closely matches historical
practice. (Bytes, words, and <newline> characters are counted separately
and the results are written when an end-of-file is detected.)"

A file that does not end in a newline is _not_ a text file, and the
partial data is _not_ counted as a line according to historical practice.

> This message contains confidential information of Scartel, Ltd.

It is considered poor netiquette to send emails to publicly archived
lists with disclaimers like this, since the very nature of public
archival makes this clause unenforceable.  You are better off using a
secondary account that does not add your employer's disclaimer on the end.

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

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---

reply via email to

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