bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: sed does not flush output.


From: Stepan Kasal
Subject: Re: sed does not flush output.
Date: Sat, 15 Feb 2003 07:47:27 +0100
User-agent: Mutt/1.2.5.1i

Hello,

On Fri, Feb 14, 2003 at 04:18:18PM +0100, Carlo Wood wrote:
> I would like to use sed to filter log files that
> I am monitoring live.  That fails because sed doesn't flush.
...
> Can you please add a commandline option to 
> make sed flush after every new-line?

the current version, 4.0.5, has such an option: -u.

This version also has a better autodetection, so the example you
showed would work with it even without ``-u''.

Similar autodetection has been implemented in GNU awk, many years ago,
so it's probable that if you try

        tail -f log | gawk '{sub(/test/,"X");print}'

it'll work out of the box.

You are welcome,
        Stepan Kasal




reply via email to

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