GNU bug report logs - #23190
wc - Different output

Previous Next

Package: coreutils;

Reported by: Seva Adari <oddissyus <at> gmail.com>

Date: Sat, 2 Apr 2016 19:26:02 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Seva Adari <oddissyus <at> gmail.com>
To: 23190 <at> debbugs.gnu.org
Subject: bug#23190: wc - Different output
Date: Fri, 1 Apr 2016 18:02:00 -0400
[Message part 1 (text/plain, inline)]
Hello,

I am not sure if this a bug or expected behavior! Here is different output
from each run variation of wc invocation:
    wc -l test.txt                                         Output: 20
    awk '{print $0}' /tmp/test.txt | wc -l       Output: 21
    cut /tmp/test.txt -f1 | wc -l                    Output: 21

Similarly, when I read file from a python program I get 21 line count.

File, test.txt (attached here with) could be missing last "new line".

Thanks
Seva
[Message part 2 (text/html, inline)]
[test.txt.gz (application/x-gzip, attachment)]

This bug report was last modified 6 years and 292 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.