Re: [Hampshire] unwanted buffering of ssh output when piping…

Top Page

Reply to this message
Author: Victor Churchill
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] unwanted buffering of ssh output when piping into awk
2008/4/10 Graham Bleach <graham@???>:
> On 10/04/2008, Victor Churchill <victorchurchill@???> wrote:
> > ssh someServer "tail -f blah_log" | awk '{doSomeStuff}' ==>
> > somewhere in ssh, or in my bash or awk, data is buffered and only
> > appears on my terminal after it reaches 4K characters.
>
> Try the option to tell awk not to buffer input. It's -W interactive on
> my version.



Hah! Not a case of RTFM but rather RTFMAFTPYU! (...appropriate for the
platform you're using)
Red Hat (which runs the server) has no -Wi on its awk; Ubuntu on my
desktop does. And saying
ssh server "tail -f blah" | awk -W interactive {stuff} | pr
-morestuff now runs like a charm.

Thank you, Graham! I was /sure/ I'd gone through the awk man pages and
not seen a hint. BUt we tend to see what we expect to see...