[plug] tail -f

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


On Fri, Aug 12, 2005 at 10:53:16AM +0930, Onno Benschop wrote:
> Hi folks,
> 
> I'm trying to come up with a way that I can watch the tail of a log file 
> until a certain string occurs, then I want to stop watching. (The 
> functionality is to prod fetchmail and watch until the sleeping message 
> comes past.)
> 
> Anyone got any bright ideas?

awk

tail -F file | awk '{print;} /string/{exit;}'


-- 
Russell Steicke

-- Fortune says:
A well-known friend is a treasure.



More information about the plug mailing list