[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Possible bug with grep/sed/tail?

From: Pádraig Brady
Subject: Re: Possible bug with grep/sed/tail?
Date: Mon, 24 Nov 2008 10:12:10 +0000
User-agent: Thunderbird (X11/20071008)

Jim Meyering wrote:
>> What about adding buffer control to all coretuils filters.
>> Is that still a desired feature do you think?
> I don't relish the idea of adding an option or feature
> to each and every filter in coreutils.  Especially
> considering that this approach solves the problem --
> albeit with requirement on gcc and LD_PRELOAD.
> Maybe we can relax that requirement...

A general tool would be much better than adding options
to all filters, hence why I originally asked to have this
added to glibc.

I wonder would it be useful to have a "Modified command invocation"
command that set the LD_PRELOAD environment variable to point
to a lib installed, and also set other environment variables
to control the buffering depending on command line options.

For example if we called the command stdbuf, then
the following pipeline would be line buffered:

tail -f access.log | stdbuf --fd=1 --size=1 cut -d' ' -f1 | uniq

size=0 => unbuffered
size=1 => line buffered
size>1 -> specific buffer size

Also we could have aliases for stdin stdout, linebuffered, ...

We still have the requirement on LD_PRELOAD, but
that's not too bad I think?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]