From owner-freebsd-current@FreeBSD.ORG Wed Aug 4 16:28:11 2010 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F21FA1065672 for ; Wed, 4 Aug 2010 16:28:11 +0000 (UTC) (envelope-from lars@e.0x20.net) Received: from mail.0x20.net (mail.0x20.net [217.69.67.217]) by mx1.freebsd.org (Postfix) with ESMTP id A38708FC13 for ; Wed, 4 Aug 2010 16:28:11 +0000 (UTC) Received: by mail.0x20.net (Postfix, from userid 1002) id 182343A581; Wed, 4 Aug 2010 18:28:10 +0200 (CEST) Date: Wed, 4 Aug 2010 18:28:10 +0200 From: Lars Engels To: Alexandre Sunny Kovalenko Message-ID: <20100804162809.GE59909@e.0x20.net> References: <86eiefhalp.wl%poyopoyo@puripuri.plala.or.jp> <4C585E44.5030608@FreeBSD.org> <1280933468.2752.2.camel@RabbitsDen> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6zdv2QT/q3FMhpsV" Content-Disposition: inline In-Reply-To: <1280933468.2752.2.camel@RabbitsDen> X-Editor: VIM - Vi IMproved 7.2 X-Operation-System: FreeBSD 5.5-RELEASE-p19 User-Agent: Mutt/1.5.20 (2009-06-14) Cc: poyopoyo@puripuri.plala.or.jp, Gabor Kovesdan , current@FreeBSD.org Subject: Re: bsdgrep does not work with tail -f | grep combination X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Aug 2010 16:28:12 -0000 --6zdv2QT/q3FMhpsV Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 04, 2010 at 10:51:08AM -0400, Alexandre Sunny Kovalenko wrote: > On Tue, 2010-08-03 at 20:21 +0200, Gabor Kovesdan wrote: > > Em 2010.08.03. 19:25, poyopoyo@puripuri.plala.or.jp escreveu: > > > Hi, > > > > > > It seems bsdgrep does not work when piped from tail -f. > > > I'm running r210728. > > > > > > term0$ jot 10> /tmp/1 > > > term0$ tail -f /tmp/1 | grep 0 > > > [no output] > > > > > > otherterm$ jot 10>> /tmp/1 > > > [no output to term0] > > > > > > =3D=3D=3D=3D=3D > > > > > > with GNU grep: > > > > > > term0$ tail -f /tmp/1 | gnugrep 0 > > > 10 > > > otherterm$ jot 10>> /tmp/1 > > > [on term0] > > > 10 > > > 10 > > > =20 > > I've checked on 8.0 and GNU grep doesn't output anything either for me.= =20 > > If you use tail -f, you will enter more lines and end it with EOF, won'= t=20 > > you? And then BSD grep will process the input and print out matches. I= =20 > > don't think it's bad behaviour in itself but if you can explain why you= =20 > > think it's bad I'm willing to change it. > >=20 > I am not sure it is specific to the GNU grep -- below is the example > from AIX 5.3: [...] Same on Solaris, so this is not a GNU feature. --6zdv2QT/q3FMhpsV Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkxZlRkACgkQKc512sD3afhQrQCgoE4GxiQmoobdban3avHI2zGu rbcAn26hNf8hVKMvdwJyTtS2mNWkVyMf =oUJC -----END PGP SIGNATURE----- --6zdv2QT/q3FMhpsV--