#tail the file you want to watch
tail -fn0 /var/log/logfile | while read line ; do
echo "$line" | grep 'line to react to' | grep -v 'things to block the reaction'
if [ $? = 0 ]
# do things
echo "just saw $line"
save this as script.sh
make it exectuable (chmod +x script.sh)
and let it run in the background ./script.sh &