Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Aug 2010 18:28:10 +0200
From:      Lars Engels <lars.engels@0x20.net>
To:        Alexandre Sunny Kovalenko <gaijin.k@ovi.com>
Cc:        poyopoyo@puripuri.plala.or.jp, Gabor Kovesdan <gabor@FreeBSD.org>, current@FreeBSD.org
Subject:   Re: bsdgrep does not work with tail -f | grep combination
Message-ID:  <20100804162809.GE59909@e.0x20.net>
In-Reply-To: <1280933468.2752.2.camel@RabbitsDen>
References:  <86eiefhalp.wl%poyopoyo@puripuri.plala.or.jp> <4C585E44.5030608@FreeBSD.org> <1280933468.2752.2.camel@RabbitsDen>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100804162809.GE59909>