[plug] audible ping

Bernard Blackham bernard at blackham.com.au
Sun Jul 28 15:16:46 WST 2002


On Sun, Jul 28, 2002 at 03:04:23PM +0800, bob wrote:
> Ok, so why does gawk work when 'tail-f | grep" doesn't? (yah yah, my
> lousy scripting :() I was finding that ping was holding the file open so
> tail wasn't reading it till ping had finished at which point I'd get a
> flurry of beeps. I had expected tail to look at open files, apparently
> not, and had given up scripted way. 

My guess is that tail normally refuses to do anything until it hits
the end of the file. It does so when not using -f, and I suppose
with -f as well. The ping command never sent an EOF until it ended
and hence.

If you really want to use tail then specifying "+1" on the command
line will work - it tells tail to discard the first n lines, rather
than printing out the last n lines.

Rgds,
Bernard.

-- 
 Bernard Blackham
 bernard at blackham.com.au
 Australian Linux Technical Conference 2003: http://www.linux.conf.au/



More information about the plug mailing list