GNU bug report logs - #30504
bug tail -2 FILE1 FILE1 - tail: option used in invalid context -- 2

Previous Next

Package: coreutils;

Reported by: Mike Brescia <mike142wood <at> verizon.net>

Date: Sat, 17 Feb 2018 22:20:02 UTC

Severity: normal

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Mike Brescia <mike142wood <at> verizon.net>
To: bug-coreutils <at> gnu.org
Subject: bug tail -2 FILE1 FILE1  - tail: option used in invalid context -- 2
Date: Sat, 17 Feb 2018 15:57:14 -0500
<oops update after typing paragraphs below>
searching archive with "invalid context" gets to "bug#8231: Bug in the linux command: tail"
I read the exchanges from 2011 and see where it went, but gripe that now I have to type extra characters to invoke it.
Perhaps I should fear that "head" will eventually be "broken" also.
</oops>

Attempting to use tail to get some number of lines other than default 10 on more than one file returns with error message "tail: option used in invalid context -- 2" or whatever N was used as arg.

head -N works fine

"aptitude" distribution on debian/linux --

$ tail --version
tail (GNU coreutils) 8.26

$ uname -a
Linux xymon-insp 4.9.0-5-amd64 #1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04) x86_64 GNU/Linux

"homebrew" distribution on macos --

$ gtail --version
tail (GNU coreutils) 8.29

$ uname -a
Darwin DanteB.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jan 11 22:59:40 PST 2018; root:xnu-3789.73.8~1/RELEASE_X86_64 x86_64


I did check the FAQ, and tried the bug-mailing archive ( see <oops> above ). I think that the difference between "head" and "tail" operation with "-N" usage points to a bug in tail.

 -- Mike



This bug report was last modified 6 years and 205 days ago.

Previous Next


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