Monitor dynamic log file for a particular Error

Hi Folks,

I need help in creating a script to monitor a continuously updating log for one particular error. If the the script finds the error it should send out an email.

Thanks for all ur help

asked many times / answered many times.

Post sample input and expected output if you want some one to give a try.

 
tail -f movinglog.log | grep -i "error" | mail -s "Error Occured" abc@abc.com