From owner-freebsd-current@FreeBSD.ORG Wed Aug 4 21:24:13 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 BE62C1065670 for ; Wed, 4 Aug 2010 21:24:13 +0000 (UTC) (envelope-from gaijin.k@ovi.com) Received: from outbound2.messaging.lotuslive.com (outbound2.messaging.lotuslive.com [8.12.152.119]) by mx1.freebsd.org (Postfix) with ESMTP id A1EF18FC24 for ; Wed, 4 Aug 2010 21:24:13 +0000 (UTC) Received: from c-in3ofil02-03.sv2.lotuslive.com (unknown [10.6.32.50]) by c-in3obnd02-03.sv2.lotuslive.com (Postfix) with ESMTP id 506236E2E3C for ; Wed, 4 Aug 2010 21:24:12 +0000 (GMT) Received: from c-in3ws--02-06.ben.sv2.lotuslive.com (c-in3ws--02-06.sv2.lotuslive.com [10.6.32.81]) (sender gaijin.k@ovi.com) by c-in3ofil02-03.sv2.lotusliveops.com (LotusLive iNotes outfilter/0.91) with SMTP; Wed, 04 Aug 2010 21:24:12 +0000 Received: (qmail 31442 invoked from network); 4 Aug 2010 21:24:12 -0000 Received: from unknown (HELO c-in3play02-01.sv2.lotusliveops.com) (gaijin.k@ovi.com@74.105.210.169) by 81.32.5.10.in-addr.arpa with SMTP; 4 Aug 2010 21:24:11 -0000 From: "Alexandre \"Sunny\" Kovalenko" To: Gabor Kovesdan In-Reply-To: <4C585E44.5030608@FreeBSD.org> References: <86eiefhalp.wl%poyopoyo@puripuri.plala.or.jp> <4C585E44.5030608@FreeBSD.org> Content-Type: text/plain; charset="UTF-8" Date: Wed, 04 Aug 2010 10:51:08 -0400 Message-ID: <1280933468.2752.2.camel@RabbitsDen> MIME-Version: 1.0 X-Mailer: Evolution 2.30.2 FreeBSD GNOME Team Port Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Cc: poyopoyo@puripuri.plala.or.jp, 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 21:24:13 -0000 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=20=20=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: sunny@irptdev_1>tail -f engine.log | grep Hello=20=20=20=20 Aug 4 10:41:39 irptdev_1 local3:debug sunny: Hello Wed Aug 4 10:41:39 EDT 2010=20 Aug 4 10:41:46 irptdev_1 local3:debug sunny: Hello Wed Aug 4 10:41:46 EDT 2010=20 Aug 4 10:41:57 irptdev_1 local3:debug sunny: Hello Wed Aug 4 10:41:57 EDT 2010=20 I am doing=20 sunny@irptdev_1>logger -p local3.debug Hello `date` sunny@irptdev_1>logger -p local3.debug Hello `date` sunny@irptdev_1>logger -p local3.debug Hello `date` from different terminal window. HTH, --=20 Alexandre Kovalenko (=D0=9E=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80= =D0=9A=D0=BE=D0=B2=D0=B0=D0=BB=D0=B5=D0=BD=D0=BA=D0=BE) -------------------------------------------------------------- Ovi Mail: Making email access easy http://mail.ovi.com