Sponsored Content
Full Discussion: I need your help.
Operating Systems Solaris I need your help. Post 302233329 by era on Sunday 7th of September 2008 06:57:43 AM
Old 09-07-2008
I think it needs to be said again: tail -f sounds like the ticket. You can combine the tail -f and the grep in a simple Perl script. Whatever the implementation, the idea is to keep the file open, and attempt to read another line, say, once per second, or once every five seconds. If the read fails, it means no data has been appended to the file. If it succeeds, there is new data; read and examine, and if it's a hit, take some action (terminate? send another process a signal? send an email?)
 
All times are GMT -4. The time now is 09:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy