Watcher Script

Hi Guys,

I hope anyone can help me on how to create a watcher-script. The script will act as watcher wherein whenever it will find an error (say the word Error) in a file, it will prompt the user.

Please help!

br,
rymnd_12345

grep error file > /dev/null && echo "error found in file"

Hi Raymond,

Dont ask the same question again and again...

grep "error" file >/dev/null && mail -s "Error Found" abc@xyz.com

Hi Guys,

Thanks for your help!

Hi itkamaraj,

I'm sorry.

br,
rymnd_12345