From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 25 02:21:03 2011 Received: (at submit) by debbugs.gnu.org; 25 Aug 2011 06:21:03 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QwTJG-0006qL-V9 for submit@debbugs.gnu.org; Thu, 25 Aug 2011 02:21:03 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QwTGf-0006mN-U7 for submit@debbugs.gnu.org; Thu, 25 Aug 2011 02:18:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QwTE6-0006wk-Up for submit@debbugs.gnu.org; Thu, 25 Aug 2011 02:15:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:35378) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwTE6-0006wg-TJ for submit@debbugs.gnu.org; Thu, 25 Aug 2011 02:15:42 -0400 Received: from eggs.gnu.org ([140.186.70.92]:38826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwTE5-0006rm-S5 for bug-coreutils@gnu.org; Thu, 25 Aug 2011 02:15:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QwTE4-0006wM-KL for bug-coreutils@gnu.org; Thu, 25 Aug 2011 02:15:41 -0400 Received: from mailbackend.panix.com ([166.84.1.89]:41582) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwTE4-0006wI-IZ for bug-coreutils@gnu.org; Thu, 25 Aug 2011 02:15:40 -0400 Received: from panix5.panix.com (panix5.panix.com [166.84.1.5]) by mailbackend.panix.com (Postfix) with ESMTP id 9B4453459F for ; Thu, 25 Aug 2011 02:15:39 -0400 (EDT) Received: by panix5.panix.com (Postfix, from userid 13785) id 7FBF224251; Thu, 25 Aug 2011 02:15:39 -0400 (EDT) To: bug-coreutils@gnu.org Subject: "tail -f -1" should work From: Eli the Beareded Organization: Some absurd concept Message-Id: <20110825061539.7FBF224251@panix5.panix.com> Date: Thu, 25 Aug 2011 02:15:39 -0400 (EDT) X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 25 Aug 2011 02:21:01 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) $ tail --version tail (GNU coreutils) 8.5 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Paul Rubin, David MacKenzie, Ian Lance Taylor, and Jim Meyering. $ $ tail -f -1 some.log tail: option used in invalid context -- 1 $ On any other system I have used the -NUM option can be used with the -f option to specify how many lines of the file as-is to print before starting to follow it for updates. With this version of tail, it always prints ten lines and then starts the follow. Elijah From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 25 10:23:54 2011 Received: (at 9370) by debbugs.gnu.org; 25 Aug 2011 14:23:54 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QwaqX-00064e-No for submit@debbugs.gnu.org; Thu, 25 Aug 2011 10:23:53 -0400 Received: from senmx12-mx.siemens-enterprise.com ([62.134.46.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QwaqU-00064V-KZ for 9370@debbugs.gnu.org; Thu, 25 Aug 2011 10:23:51 -0400 Received: from MCHP063A.global-ad.net (unknown [172.29.37.61]) by senmx12-mx.siemens-enterprise.com (Server) with ESMTP id 5778923F06BC; Thu, 25 Aug 2011 16:21:10 +0200 (CEST) Received: from MCHP058A.global-ad.net ([172.29.37.55]) by MCHP063A.global-ad.net ([172.29.37.61]) with mapi; Thu, 25 Aug 2011 16:21:10 +0200 From: "Voelker, Bernhard" To: Eli the Beareded , "9370@debbugs.gnu.org" <9370@debbugs.gnu.org> Date: Thu, 25 Aug 2011 16:21:03 +0200 Subject: RE: bug#9370: "tail -f -1" should work Thread-Topic: bug#9370: "tail -f -1" should work Thread-Index: AcxjLgUm1i6KJPmLS6S+NITNFGdPpQAArn0A Message-ID: <7856072A9D04C24B82DFE2B1112FE38A0C27491ECE@MCHP058A.global-ad.net> References: <20110825061539.7FBF224251@panix5.panix.com> In-Reply-To: <20110825061539.7FBF224251@panix5.panix.com> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: 9370 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.3 (---) Eli the Beareded wrote: > $ tail -f -1 some.log > tail: option used in invalid context -- 1 > $ I think you wanted this: $ tail -f -n1 some.log The syntax is explained quite nice in recent versions: -n, --lines=3DK output the last K lines, instead of the last= 10; or use -n +K to output lines starting with the= Kth ... If the first character of K (the number of bytes or lines) is a `+', print beginning with the Kth item from the start of each file, otherwise, print the last K items in the file. K may have a multiplier suffix: ... Have fun, Berny From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 25 14:51:38 2011 Received: (at 9370) by debbugs.gnu.org; 25 Aug 2011 18:51:38 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qwf1d-0007Zh-4E for submit@debbugs.gnu.org; Thu, 25 Aug 2011 14:51:38 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qwf1Y-0007ZV-JX for 9370@debbugs.gnu.org; Thu, 25 Aug 2011 14:51:33 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 3F66739E80F2; Thu, 25 Aug 2011 11:48:51 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Vo7NX5SjcQaX; Thu, 25 Aug 2011 11:48:50 -0700 (PDT) Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id D705439E80CF; Thu, 25 Aug 2011 11:48:50 -0700 (PDT) Message-ID: <4E56990D.3040204@cs.ucla.edu> Date: Thu, 25 Aug 2011 11:48:45 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 MIME-Version: 1.0 To: Eli the Beareded Subject: Re: bug#9370: "tail -f -1" should work References: <20110825061539.7FBF224251@panix5.panix.com> In-Reply-To: <20110825061539.7FBF224251@panix5.panix.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 9370 Cc: 9370@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.0 (---) On 08/24/11 23:15, Eli the Beareded wrote: > On any other system I have used the -NUM option can be used with > the -f option to specify how many lines of the file as-is to print > before starting to follow it for updates. The interaction between -NUM and other options is so complicated and unportable (different editions of the POSIX standards disagree!) that GNU 'tail' is fairly conservative about where it allows -NUM. It might be nice to add support for your particular usage, if someone wants to write the code, but it'll require some care to make sure it doesn't run afoul of existing usage or standard in some other way. In the meantime I suggest using "tail -f -n NUM", as that's standard and portable these days. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 13 08:22:36 2011 Received: (at 9370) by debbugs.gnu.org; 13 Sep 2011 12:22:36 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3S0Z-0001SE-TL for submit@debbugs.gnu.org; Tue, 13 Sep 2011 08:22:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3S0X-0001S7-8c for 9370@debbugs.gnu.org; Tue, 13 Sep 2011 08:22:34 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p8DCI5OL025199 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 13 Sep 2011 08:18:05 -0400 Received: from mx.meyering.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p8DCI4wS026783; Tue, 13 Sep 2011 08:18:05 -0400 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 176CE6005B; Tue, 13 Sep 2011 14:18:04 +0200 (CEST) From: Jim Meyering To: Eli the Beareded , 9370@debbugs.gnu.org Subject: Re: bug#9370: "tail -f -1" should work In-Reply-To: <4E56990D.3040204@cs.ucla.edu> (Paul Eggert's message of "Thu, 25 Aug 2011 11:48:45 -0700") References: <20110825061539.7FBF224251@panix5.panix.com> <4E56990D.3040204@cs.ucla.edu> Date: Tue, 13 Sep 2011 14:18:03 +0200 Message-ID: <878vps63gk.fsf@rho.meyering.net> Lines: 20 MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-Spam-Score: -10.5 (----------) X-Debbugs-Envelope-To: 9370 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -10.5 (----------) tags 9370 notabug wishlist thanks Paul Eggert wrote: > On 08/24/11 23:15, Eli the Beareded wrote: >> On any other system I have used the -NUM option can be used with >> the -f option to specify how many lines of the file as-is to print >> before starting to follow it for updates. > > The interaction between -NUM and other options is so complicated > and unportable (different editions of the POSIX standards > disagree!) that GNU 'tail' is fairly conservative about where it > allows -NUM. It might be nice to add support for your particular usage, > if someone wants to write the code, but it'll require some care to make > sure it doesn't run afoul of existing usage or standard in some other way. > > In the meantime I suggest using "tail -f -n NUM", as that's standard > and portable these days. I've marked this as a wishlist item. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 13 09:37:04 2011 Received: (at control) by debbugs.gnu.org; 13 Sep 2011 13:37:04 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3TAd-00077i-Ua for submit@debbugs.gnu.org; Tue, 13 Sep 2011 09:37:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3TAa-00077J-Sz for control@debbugs.gnu.org; Tue, 13 Sep 2011 09:37:02 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p8DDWXjG027768 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 13 Sep 2011 09:32:33 -0400 Received: from mx.meyering.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p8DDWW5M026656 for ; Tue, 13 Sep 2011 09:32:32 -0400 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id C732F6005B for ; Tue, 13 Sep 2011 15:32:31 +0200 (CEST) From: Jim Meyering To: control@debbugs.gnu.org Subject: wishlist In-Reply-To: <201109131218.p8DCI9OK025202@mx1.redhat.com> (Mail Delivery Subsystem's message of "Tue, 13 Sep 2011 08:18:09 -0400") References: <201109131218.p8DCI9OK025202@mx1.redhat.com> Date: Tue, 13 Sep 2011 15:32:31 +0200 Message-ID: <87hb4g36vk.fsf@rho.meyering.net> Lines: 2 MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Spam-Score: -10.5 (----------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -10.5 (----------) severity 9370 wishlist thanks