From owner-freebsd-bugs@FreeBSD.ORG Thu Dec 25 11:50:08 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7201916A4CE for ; Thu, 25 Dec 2003 11:50:08 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8F64443D2D for ; Thu, 25 Dec 2003 11:50:07 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) hBPJo7FR002852 for ; Thu, 25 Dec 2003 11:50:07 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id hBPJo70K002851; Thu, 25 Dec 2003 11:50:07 -0800 (PST) (envelope-from gnats) Date: Thu, 25 Dec 2003 11:50:07 -0800 (PST) Message-Id: <200312251950.hBPJo70K002851@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Friedemann Becker Subject: Re: bin/53288: tail will sometimes display more lines than it is told X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Friedemann Becker List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2003 19:50:08 -0000 The following reply was made to PR bin/53288; it has been noted by GNATS. From: Friedemann Becker To: freebsd-gnats-submit@FreeBSD.org, hburch@lumeta.com Cc: Subject: Re: bin/53288: tail will sometimes display more lines than it is told Date: Thu, 25 Dec 2003 20:48:03 +0100 in How-To-Repeat it should be while [ 1 ]; do echo test; done > file and for i in `jot 1000 1`; do tail file | wc -l; done > linecnt ( - freebsd uses jot, seq is gnu and if you install it via the port /usr/ports/misc/sh-utils you have to invoke it with 'gseq' - semikolon before done ) I have got an easy workaround for it: if a file is written to (or could be) while you want to 'tail' it, just do an cat file | tail that gives tail a snapshot of the file and the results of the above test are correct. but someone should document this in man1/tail.1