[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible bug with grep/sed/tail?
From: |
Jim Meyering |
Subject: |
Re: Possible bug with grep/sed/tail? |
Date: |
Mon, 24 Nov 2008 11:46:32 +0100 |
Pádraig Brady <address@hidden> wrote:
> 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?
I like that. The "stdbuf" name sounds fine, too.
Though maybe use --size=-1 to indicate line buffering,
(or even a separate --line-buffered option),
rather than usurping --size=1.
Sounds like you've just volunteered ;-)
- Re: Possible bug with grep/sed/tail?, (continued)
- Re: Possible bug with grep/sed/tail?, Paolo Bonzini, 2008/11/21
- Re: Possible bug with grep/sed/tail?, Andreas Schwab, 2008/11/21
- Re: Possible bug with grep/sed/tail?, Jim Meyering, 2008/11/21
- Re: Possible bug with grep/sed/tail?, Jim Meyering, 2008/11/22
- Re: Possible bug with grep/sed/tail?, Pádraig Brady, 2008/11/22
- Re: Possible bug with grep/sed/tail?, Jim Meyering, 2008/11/22
- Re: Possible bug with grep/sed/tail?, Brian Dessent, 2008/11/22
- Re: Possible bug with grep/sed/tail?, Jim Meyering, 2008/11/29
- Re: Possible bug with grep/sed/tail?, Pádraig Brady, 2008/11/30
- Re: Possible bug with grep/sed/tail?, Pádraig Brady, 2008/11/24
- Re: Possible bug with grep/sed/tail?,
Jim Meyering <=
- Re: Possible bug with grep/sed/tail?, Pádraig Brady, 2008/11/25
- Re: Possible bug with grep/sed/tail?, Jim Meyering, 2008/11/25
- Re: Possible bug with grep/sed/tail?, Paolo Bonzini, 2008/11/25
- Re: Possible bug with grep/sed/tail?, Jim Meyering, 2008/11/25
- Re: Possible bug with grep/sed/tail?, Paolo Bonzini, 2008/11/25
- Re: Possible bug with grep/sed/tail?, Pádraig Brady, 2008/11/25
- Re: Possible bug with grep/sed/tail?, Pádraig Brady, 2008/11/25
- Re: Possible bug with grep/sed/tail?, Jim Meyering, 2008/11/25
- Re: Possible bug with grep/sed/tail?, Paolo Bonzini, 2008/11/21