Your message dated Tue, 16 Jun 2020 10:48:35 -0400
with message-id <[email protected]>
and subject line Re: Bug#962602: coreutils: head does not report if too few
lines are present
has caused the Debian Bug report #962602,
regarding coreutils: head does not report if too few lines are present
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
962602: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=962602
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: coreutils
Version: 8.30-3
Severity: normal
Tags: upstream
Dear Maintainer,
When requesting the first four lines of a ten-line input using
printf '%2d\n' {1..10} | head -n 4
in GNU bash, the output is
1
2
3
4
as expected. However, when asking for the first 14 lines using
printf '%2d\n' {1..10} | head -n 14
the output is
1
2
3
4
5
6
7
8
9
10
which, strictly speaking, is incorrect, because the output does
not contain exactly 14 lines.
I suggest changing the documentation to read "at most N
lines" instead of just "N lines", mutatis mutandis, in various
places. Alternatively, print a warning "input has too few lines"
or similar. I am undecided as to whether the exit status should
reflect this.
-- System Information:
Debian Release: 10.3
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.19.0-8-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8), LANGUAGE=en_US:en
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages coreutils depends on:
ii libacl1 2.2.53-4
ii libattr1 1:2.4.48-4
ii libc6 2.28-10
ii libselinux1 2.8-1+b1
coreutils recommends no packages.
coreutils suggests no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
On Wed, Jun 10, 2020 at 06:58:55PM +0200, Thure Dührsen wrote:
which, strictly speaking, is incorrect, because the output does
not contain exactly 14 lines.
This is behavior that has existed for decades, it isn't going to change.
There's nothing in the man page that I see to suggest that the program
will error out if there are fewer lines than requested, and it doesn't
seem to be a common source of confusion.
--- End Message ---