[plug] tail -f

Russell Steicke r.steicke at bom.gov.au
Fri Aug 12 09:59:34 WST 2005


On Fri, Aug 12, 2005 at 11:14:12AM +0930, Onno Benschop wrote:
> Thanks for the really quick response, but it's not working as I 
> expected, this just sits there:
> 
> sudo /etc/init.d/fetchmail awaken && tail -n0 -f /var/log/syslog | grep 
> fetch | awk '{print;} /sleeping/{exit;}'

Stdio buffering.  Assuming you're using GNU grep, try the
--line-buffered flag to grep.

However there seems to be another wart.  When I tried this just now,
awk didn't exit until it received the next line after the matching
line.  I'm not sure why this is.


-- 
Russell Steicke

-- Fortune says:
Non-Determinism is not meant to be reasonable.
		-- M.J. 0'Donnell



More information about the plug mailing list