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