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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 19857 in the body.
You can then email your comments to 19857 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#19857
; Package
coreutils
.
(Fri, 13 Feb 2015 17:13:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
matshyeq <matshyeq <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Fri, 13 Feb 2015 17:13:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi All,
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.
For those that don't have it - it doesn't return anything.
BTW. I know -n-0 might be nonsensical but in my case simply pass the number
of rows to skip in a variable.
Regards,
Maciek
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#19857
; Package
coreutils
.
(Fri, 13 Feb 2015 17:24:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 19857 <at> debbugs.gnu.org (full text, mbox):
unarchive 16329
forcemerge 19857 16329
stop
On 13/02/15 16:21, matshyeq wrote:
> Hi All,
>
> 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.
> For those that don't have it - it doesn't return anything.
>
> BTW. I know -n-0 might be nonsensical but in my case simply pass the number of rows to skip in a variable.
Fixed in version 8.23
http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=476ce370
thanks,
Pádraig.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#19857
; Package
coreutils
.
(Fri, 13 Feb 2015 17:26:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 19857 <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#19857
; Package
coreutils
.
(Fri, 21 Aug 2015 16:36:02 GMT)
Full text and
rfc822 format available.
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)]
Added tag(s) fixed.
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Tue, 23 Oct 2018 01:47:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
19857 <at> debbugs.gnu.org and matshyeq <matshyeq <at> gmail.com>
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Tue, 23 Oct 2018 01:47:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 20 Nov 2018 12:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 6 years and 264 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.