[ale] SHELL: log files monitoring

Zyman, Andy zymana at hra.nyc.gov
Thu Feb 14 11:45:48 EST 2002


Hello.
Happy Valentines Day folks :)

I have simple task : I need to monitor a log files for particular string.

for this purpose I made QD script which is doing basically this:

for i in $* ; do
 tail -f | while read line
	case $line
	    <word i'm looking for>)   send email ;;
 	esac
 done &
done

so, I have from 1 to N ( where n - number of params ) background processes.

But, I have a strong feeling that it should be a better way to do this.
any ideas?

Thank You
 Andy


InterScan VirusWall processing complete - message virus-free.



---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.




More information about the Ale mailing list