Date: Thu, 25 Dec 2003 11:50:07 -0800 (PST) From: Friedemann Becker <Friedemann.Becker@student.uni-tuebingen.de> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/53288: tail will sometimes display more lines than it is told Message-ID: <200312251950.hBPJo70K002851@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/53288; it has been noted by GNATS. From: Friedemann Becker <Friedemann.Becker@student.uni-tuebingen.de> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200312251950.hBPJo70K002851>