GNU bug report logs -
#52077
tail: a case where -n is not taken as implicit
Previous Next
Reported by: Shehu Dikko <news.shehu <at> gmx.net>
Date: Wed, 24 Nov 2021 11:25:01 UTC
Severity: normal
Tags: notabug
Found in version 9.0
Done: Pádraig Brady <P <at> draigBrady.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 52077 in the body.
You can then email your comments to 52077 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
news.shehu <at> gmx.net, bug-coreutils <at> gnu.org
:
bug#52077
; Package
coreutils
.
(Wed, 24 Nov 2021 11:25:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Shehu Dikko <news.shehu <at> gmx.net>
:
New bug report received and forwarded. Copy sent to
news.shehu <at> gmx.net, bug-coreutils <at> gnu.org
.
(Wed, 24 Nov 2021 11:25:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Package: coreutils
Version: 9.0
Do please take a look at this example:
% printf '%s\n' just three lines | tee >f1 f2
% tail -n1 f1
lines
% tail -n1 f*
==> f1 <==
lines
==> f2 <==
lines
% tail -1 f1
lines
% tail -1 f*
tail: option used in invalid context -- 1
% tail --version | head -1
tail (GNU coreutils) 9.0
Note that with head and busybox tail, the outputs are unsurprising:
% head -1 f*
==> f1 <==
just
==> f2 <==
just
% head --version | head -1
head (GNU coreutils) 9.0
% busybox tail -1 f*
==> f1 <==
lines
==> f2 <==
lines
%
% uname -v
#1 SMP Debian 4.19.194-3 (2021-07-18)
regards,
s h e h u
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#52077
; Package
coreutils
.
(Wed, 24 Nov 2021 15:57:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 52077 <at> debbugs.gnu.org (full text, mbox):
tag 52077 notabug
close 52077
stop
On 24/11/2021 07:38, Shehu Dikko wrote:
> Package: coreutils
> Version: 9.0
>
> Do please take a look at this example:
>
> % printf '%s\n' just three lines | tee >f1 f2
> % tail -n1 f1
> lines
> % tail -n1 f*
> ==> f1 <==
> lines
>
> ==> f2 <==
> lines
> % tail -1 f1
> lines
> % tail -1 f*
> tail: option used in invalid context -- 1
> % tail --version | head -1
> tail (GNU coreutils) 9.0
>
> Note that with head and busybox tail, the outputs are unsurprising:
>
> % head -1 f*
> ==> f1 <==
> just
>
> ==> f2 <==
> just
> % head --version | head -1
> head (GNU coreutils) 9.0
> % busybox tail -1 f*
> ==> f1 <==
> lines
>
> ==> f2 <==
> lines
> %
> % uname -v
> #1 SMP Debian 4.19.194-3 (2021-07-18)
The compat for that older syntax is not extended to multiple files.
From the info docs:
For compatibility ‘tail’ also supports an obsolete usage ‘tail
-[NUM][bcl][f] [FILE]’, which is recognized only if it does not conflict
with the usage described above. This obsolete form uses exactly one
option and at most one file.
cheers,
Pádraig
Added tag(s) notabug.
Request was from
Pádraig Brady <P <at> draigBrady.com>
to
control <at> debbugs.gnu.org
.
(Wed, 24 Nov 2021 15:57:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
52077 <at> debbugs.gnu.org and Shehu Dikko <news.shehu <at> gmx.net>
Request was from
Pádraig Brady <P <at> draigBrady.com>
to
control <at> debbugs.gnu.org
.
(Wed, 24 Nov 2021 15:57: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
.
(Thu, 23 Dec 2021 12:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 86 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.