# Monitoring script for Log file

**URL:** <https://community.unix.com/t/monitoring-script-for-log-file/357948>\
**Category:** UNIX for Beginners Q & A\
**Created:** [January 15, 2016, 9:29am UTC](https://community.unix.com/t/monitoring-script-for-log-file/357948 "2016-01-15T09:29:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vij05](https://community.unix.com/letter_avatar/vij05/32/5_5575768a8748004e209b776fc1b2916d.png) [@vij05](https://community.unix.com/u/vij05)\
**Post date:** [January 15, 2016, 9:29am UTC](https://community.unix.com/t/monitoring-script-for-log-file/357948/1 "2016-01-15T09:29:25Z")

</div>

Hi,  
Iam new to unix , plz help me to write below script.  
I need to write a script for Monitoring log file when any error occurs it has to send a mail to specified users and it should be always pick latest error not the existing one and the script should be able to send mail all errors (more than one)

thank you

---

<div class="post-metadata">

**Author:** ![marecar](https://community.unix.com/letter_avatar/marecar/32/5_5575768a8748004e209b776fc1b2916d.png) [@marecar](https://community.unix.com/u/marecar)\
**Post date:** [January 18, 2016, 1:11pm UTC](https://community.unix.com/t/monitoring-script-for-log-file/357948/2 "2016-01-18T13:11:47Z")

</div>

Who creates the log file? What kind of errors are you trying to capture? What is the OS you are running? Give more details pls.
