GNU bug report logs -
#19857
BUG with head "-n-0"
Previous Next
Reported by: matshyeq <matshyeq <at> gmail.com>
Date: Fri, 13 Feb 2015 17:13:02 UTC
Severity: normal
Tags: fixed
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 19857 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I can confirm BUG exists on
CentOS Linux release 7.1.1503 (Core)
# head --version
head (GNU coreutils) 8.22
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by David MacKenzie and Jim Meyering.
# printf 'abc\ndef\nghi\n'>head_test_ok.txt
# head -n-0 head_test_ok.txt
abc
def
ghi
# printf 'abc\ndef\nghi'>head_test_nok.txt
# head -n-0 head_test_nok.txt
Thank you,
Kind Regards
~Maciek
On Fri, Feb 13, 2015 at 5:25 PM, Paul Eggert <eggert <at> cs.ucla.edu> wrote:
> matshyeq wrote:
>
>> I think I've found an issue when head is called with -n-0 parameter
>> It should return whole file but only seem to work for files with newline
>> character at the end.
>>
>
> I'm not observing this problem on Ubuntu 14.10 x86-64; see below. Which
> platform and version of 'head' are you running? Can you send a recipe to
> reproduce the bug?
>
> $ printf 'abc\ndef\nghi' >t
> $ head -n-0 t
> abc
> def
> ghi$ head --version | head -n1
> head (GNU coreutils) 8.23
>
>
[Message part 2 (text/html, inline)]
This bug report was last modified 6 years and 267 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.