Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: trouble with multiple pipes



On Wed, Jun 09, 1999 at 08:41:58PM +0400, borsenkow.msk@xxxxxx wrote:
> > I am using zsh 3.0.5 on a 2.2.5 Linux kernel. I encountered a problem
> > when trying to use multiple pipes with and a command that does not
> > finish:
> >
> >   # tail -f foo
> >   1
> >   2
> >   3
> >   4
> >   5
> >   (pressed ^C to stop tail)
> >
> > Now I don't want to see all lines with a '5':
> >
> >   # tail -f foo | grep -v 5
> 
> I am surprised, that you get any output here. I don't get anything at all.
> The problem is, that grep buffers input/output (I won't discuss, if it is a
> bug or a feature). So, you won't see anything till the whole buffer is
> filled. In my case grep does not do any write at all.

Ah, yes, of course.

> > Unfortunately I need to filter the output from a running
> > daemon in this way, but I'm out of ideas.
> 
> What do you mean? If you need to write the continous output to a file - it
> is O.K. As soon, as daemon fills up the whole buffer, it will be written
> off.

Hm, I'd like to see the output in real-time as well as to log it in a file.
I'll make up some kind of script using only zsh builtins :-)

Thanks

Dominik ^_^

-- 
Dominik Vogt, Hewlett-Packard GmbH, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/14-4596, fax: 07031/14-3883, dominik_vogt@xxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author