From unknown Wed Jun 18 23:12:31 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#30504 <30504@debbugs.gnu.org> To: bug#30504 <30504@debbugs.gnu.org> Subject: Status: bug tail -2 FILE1 FILE1 - tail: option used in invalid context -- 2 Reply-To: bug#30504 <30504@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:12:31 +0000 retitle 30504 bug tail -2 FILE1 FILE1 - tail: option used in invalid conte= xt -- 2 reassign 30504 coreutils submitter 30504 Mike Brescia severity 30504 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 17 17:19:45 2018 Received: (at submit) by debbugs.gnu.org; 17 Feb 2018 22:19:45 +0000 Received: from localhost ([127.0.0.1]:48715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enApc-0000a2-PM for submit@debbugs.gnu.org; Sat, 17 Feb 2018 17:19:44 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55421) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1en9Y0-0006t2-Vb for submit@debbugs.gnu.org; Sat, 17 Feb 2018 15:57:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1en9Xu-00050A-6F for submit@debbugs.gnu.org; Sat, 17 Feb 2018 15:57:23 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:50628) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1en9Xu-0004zx-3G for submit@debbugs.gnu.org; Sat, 17 Feb 2018 15:57:22 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46368) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1en9Xs-00045H-Vv for bug-coreutils@gnu.org; Sat, 17 Feb 2018 15:57:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1en9Xp-0004yY-2w for bug-coreutils@gnu.org; Sat, 17 Feb 2018 15:57:21 -0500 Received: from omr-m011e.mx.aol.com ([204.29.186.11]:55631) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1en9Xo-0004yC-Vt for bug-coreutils@gnu.org; Sat, 17 Feb 2018 15:57:17 -0500 Received: from mtaout-mbc02.mx.aol.com (mtaout-mbc02.mx.aol.com [172.26.221.142]) by omr-m011e.mx.aol.com (Outbound Mail Relay) with ESMTP id 1A45138000BB for ; Sat, 17 Feb 2018 15:57:15 -0500 (EST) Received: from [192.168.1.174] (0x5b3139322e3136382e312e3137345d [74.104.162.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mtaout-mbc02.mx.aol.com (MUA/Third Party Client Interface) with ESMTPSA id 9C78E38000083 for ; Sat, 17 Feb 2018 15:57:14 -0500 (EST) From: Mike Brescia Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: bug tail -2 FILE1 FILE1 - tail: option used in invalid context -- 2 Message-Id: <8172EC6A-CBC9-41D0-82FB-61490D2087C3@verizon.net> Date: Sat, 17 Feb 2018 15:57:14 -0500 To: bug-coreutils@gnu.org X-Mailer: Apple Mail (2.3273) x-aol-global-disposition: G x-aol-sid: 3039ac1add8e5a88972a0c43 X-AOL-IP: 74.104.162.120 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 17 Feb 2018 17:19:43 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.3 (----) 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. 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 = above ). I think that the difference between "head" and "tail" operation = with "-N" usage points to a bug in tail. -- Mike= From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 17 17:37:42 2018 Received: (at 30504) by debbugs.gnu.org; 17 Feb 2018 22:37:42 +0000 Received: from localhost ([127.0.0.1]:48722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enB70-00012U-Bq for submit@debbugs.gnu.org; Sat, 17 Feb 2018 17:37:42 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:54702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enB6z-00012H-13 for 30504@debbugs.gnu.org; Sat, 17 Feb 2018 17:37:41 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id B0DF91615FB; Sat, 17 Feb 2018 14:37:34 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id FrvzWnklZdIf; Sat, 17 Feb 2018 14:37:33 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 69BF416160E; Sat, 17 Feb 2018 14:37:33 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id pLFzUcP8oI_K; Sat, 17 Feb 2018 14:37:33 -0800 (PST) Received: from [192.168.1.9] (unknown [47.154.30.119]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 2A3F41615FB; Sat, 17 Feb 2018 14:37:33 -0800 (PST) Subject: Re: bug#30504: bug tail -2 FILE1 FILE1 - tail: option used in invalid context -- 2 To: Mike Brescia , 30504@debbugs.gnu.org References: <8172EC6A-CBC9-41D0-82FB-61490D2087C3@verizon.net> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <35bb61b8-541a-f9bd-2510-3fcc4e7c763b@cs.ucla.edu> Date: Sat, 17 Feb 2018 14:37:32 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <8172EC6A-CBC9-41D0-82FB-61490D2087C3@verizon.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 30504 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) There is a backward-compatibility problem with supporting "tail -2" with = any=20 number of extra arguments, since (for example) "tail -2c 20" has a differ= ent=20 meaning in traditional "tail" than you might think. To avoid confusion, "= tail=20 -2" is not encouraged when using non-traditional features (in your case, = two or=20 more FILE arguments). Since "tail -n2 FILE1 FILE2 ..." suffices, it's not= clear=20 that it'd be worth the aggravation to rethink this. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 29 22:48:17 2018 Received: (at 30504) by debbugs.gnu.org; 30 Oct 2018 02:48:17 +0000 Received: from localhost ([127.0.0.1]:52704 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHK4n-00004u-5O for submit@debbugs.gnu.org; Mon, 29 Oct 2018 22:48:17 -0400 Received: from mail-pg1-f178.google.com ([209.85.215.178]:38540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHK4l-0008Td-N7; Mon, 29 Oct 2018 22:48:16 -0400 Received: by mail-pg1-f178.google.com with SMTP id f8-v6so4863977pgq.5; Mon, 29 Oct 2018 19:48:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=1ztjrjDq64FrO7oXumEOXxMkI8E2xbvIlNYT1ViNOV4=; b=AJ2NilLkRUGfoAbZBlO6a7gbAUszPbQOYGz+fKCoyLAt91WiBUg+c910KKXZmBZzJf v2m3qjBBBbuySAq698BRYecGmoKqQT8tHuNph//5Jtz3JadtpwDlR+AzSGxX5TL7xamr 4sMa+AYd5bsN1Rf4c/K9Yq5s2Q91CTMgQMdo/mqsxj8PequE3YEEi5ApHD2wio5argWv OZwVZ3CmNahIyVi5HBwxZujGThFC7aksCM8iG7gYaYeF+te2D7KpltZ067bUt8K0jnds 42TgaSwFEWG8jHg0R3iHTufDJ2roMhqAryPbvU7x5+fgL6ZrdiVMHj+xGMMCPmGmRinY LpTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=1ztjrjDq64FrO7oXumEOXxMkI8E2xbvIlNYT1ViNOV4=; b=ANbuidhzhhvyl71nzc/7hqs54YxHqOj5whrD/Man4C0i72qUDsjINGt16C6F/RiNrz 7fYRsfhyrYNF8Thjm9wLq1RR10hWvmfizzzL2tKhOX54Xqb4rvQycrAzRLZMTSPDky2q q8jhdh0ldtWY/MwUiQHZNXBGyPiPQAV12KprNvoZgHoE3bXz16t1TxWmh23Fww402tW4 TwBtD6jtoJ5FcZArJYmoOHn2+1qYh0Y4Uqy3eaJ3sGcDymHuVxHMXFNNYz2UYNELyRnD 75oKvvgFj2GFwEy5xZzdjwa1r0wPTEN+ucdHS85sBUgmlAnDzmd177JxrnlFkwWXTNV0 J3Eg== X-Gm-Message-State: AGRZ1gLCKyy4hKUtAbfv+XXE3X21GExJ5p2AVHV6aGKg6oTjf5P+6duE sukUiRBqL0lEAvkvCsUTttnqxJffCv4= X-Google-Smtp-Source: AJdET5dePH5RMUCz6RZU+svMMEGd5PSyh4uuPglQNOI1jYyjTOXdTvem6CU+2e/Mk7unYkqvKWiCmQ== X-Received: by 2002:a63:1624:: with SMTP id w36-v6mr15899922pgl.409.1540867689263; Mon, 29 Oct 2018 19:48:09 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id y1-v6sm24507416pfy.89.2018.10.29.19.48.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 19:48:08 -0700 (PDT) Subject: Re: bug#30504: bug tail -2 FILE1 FILE1 - tail: option used in invalid context -- 2 To: 30504@debbugs.gnu.org References: <8172EC6A-CBC9-41D0-82FB-61490D2087C3@verizon.net> <35bb61b8-541a-f9bd-2510-3fcc4e7c763b@cs.ucla.edu> From: Assaf Gordon Message-ID: <6edfa4cd-ecb7-848c-b6eb-554ed3c0d399@gmail.com> Date: Mon, 29 Oct 2018 20:48:06 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <35bb61b8-541a-f9bd-2510-3fcc4e7c763b@cs.ucla.edu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30504 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 30504 stop (triaging old bugs) On 2018-02-17 3:37 p.m., Paul Eggert wrote: > There is a backward-compatibility problem with supporting "tail -2" with > any number of extra arguments, since (for example) "tail -2c 20" has a > different meaning in traditional "tail" than you might think. To avoid > confusion, "tail -2" is not encouraged when using non-traditional > features (in your case, two or more FILE arguments). Since "tail -n2 > FILE1 FILE2 ..." suffices, it's not clear that it'd be worth the > aggravation to rethink this. > Given the above, and no further comments, I'm closing this bug. -assaf From unknown Wed Jun 18 23:12:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 27 Nov 2018 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator