On 23/11/2006, at 7:19 PM, Erik de Castro Lopo wrote:

Michael Chesterton wrote:

I guess grep is detecting whether it's talking to a terminal, and doesn't
buffer if it is (or probably line buffers).

If you are using

        whatever | grep one | grep two

the first grep will detect that it is reading from a pipe and
writing to a pipe and will buffer writes as big as it can.

Grep has a --line-buffering option for a reason.

For any utilities that don't support this, you can use a separate program to provide buffering.

ftp://ftp.mondorescue.org/src/buffer-1.19.tgz
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to