Table of Contents
From: Vic Glass @injersey.infi.net
> I need to monitor the output of a program and start a script when > a specific word is in the output. That is, whenever the program > writes ADMIN, I want to be automatically notified.
A Bourne Shell solution:
tail -f |
while read line
do
if expr "$line" : '.*ADMIN.*'
then
mailx you <<-!
message of your choice
!
fi
donedocumented on: 04-25-99 13:26:51