bug-coreutils
[Top][All Lists]
Advanced

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

bug#28468: Bug in wc -l found


From: Assaf Gordon
Subject: bug#28468: Bug in wc -l found
Date: Fri, 15 Sep 2017 09:55:16 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

tag 28468 notabug
stop

Hello Rob,

On 2017-09-15 03:03 AM, Weidner, Robert (I/EE-31, extern) wrote:
> seems I found a bug in wc, have a look:

[[
the attach screen shot shows:
    $ wc -l monitore-serNr_all-run2.txt
    16
while the attached file appears to have 17 lines.
]]

This is not a bug, but the expected behavior.
The file you attached does not have a '\n' character
at the end of the last line.

Technically, 'wc' counts the number of '\n' characters,
not the number of appeared lines.

This is explained here:
   http://www.pixelbeat.org/docs/coreutils-gotchas.html#wc


As such, I'm marking this as not-a-bug, but discussion can
continue by replying to this thread.

regards,
 - assaf






reply via email to

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