[plug] audible ping

bob bob at contact.omen.com.au
Sun Jul 28 15:32:01 WST 2002


On Sun, 2002-07-28 at 15:16, Bernard Blackham wrote:
> 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.

Yep. That makes sense. 

> 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.

This is starting to get a little programmatic with counting loops and
all. I was hoping for a simple fix :). 

I think Leon's suggestion using gawk is a good enough answer for the
moment. Its just a simple wiring fault :).

 
> Rgds,
> Bernard.
> 
> -- 
>  Bernard Blackham
>  bernard at blackham.com.au
>  Australian Linux Technical Conference 2003: http://www.linux.conf.au/
> 
-- 
bob
Cave canem...te necet lingendo.



More information about the plug mailing list