GNU bug report logs - #42711
Tail does not recognize line number spec for multiple files

Previous Next

Package: coreutils;

Reported by: Anonymousemail <noreply <at> anonymousemail.me>

Date: Tue, 4 Aug 2020 18:32:02 UTC

Severity: normal

To reply to this bug, email your comments to 42711 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#42711; Package coreutils. (Tue, 04 Aug 2020 18:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Anonymousemail <noreply <at> anonymousemail.me>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Tue, 04 Aug 2020 18:32:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Anonymousemail <noreply <at> anonymousemail.me>
To: bug-coreutils <at> gnu.org
Subject: Tail does not recognize line number spec for multiple files
Date: Tue, 4 Aug 2020 18:19:11 +0000
[Message part 1 (text/plain, inline)]
This command gives an error:

$ tail -5 foo bar baz
tail: option used in invalid context -- 5

For comparison, the equivalent head commans works exactly as expected:

$ head -5 foo bar baz
==&gt; foo &lt;==
foo line 1
foo line 2
foo line 3
foo line 4
foo line 5

==&gt; bar &lt;==
bar line 1
bar line 2
bar line 3
bar line 4
bar line 5

==&gt; baz &lt;==
baz line 1
baz line 2
baz line 3
baz line 4
baz line 5
&nbsp;
[Message part 2 (text/html, inline)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#42711; Package coreutils. (Tue, 04 Aug 2020 19:15:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Davide Brini <dave_br <at> gmx.com>
To: bug-coreutils <at> gnu.org
Subject: Re: bug#42711: Tail does not recognize line number spec for
 multiple files
Date: Tue, 4 Aug 2020 21:14:24 +0200
On Tue, 4 Aug 2020 18:19:11 +0000, Anonymousemail
<noreply <at> anonymousemail.me> wrote:

> This command gives an error:
>
> $ tail -5 foo bar baz
> tail: option used in invalid context -- 5
>
> For comparison, the equivalent head commans works exactly as expected:

Even if head works, the -<number> syntax is obsolete and should be replaced
by -n <number>.

Try "tail -n 5" and it should work.

--
D.




This bug report was last modified 4 years and 93 days ago.

Previous Next


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