1

How to write a shell script which monitors an continuously updating file and sends an alert for the occurrence of error (matching pattern) and after the error gets resolved, the script starts reading the file after the last occurence of error so as no further alerts are sent?

  • Something like this? https://stackoverflow.com/questions/4331309/shellscript-to-monitor-a-log-file-if-keyword-triggers-then-execute-a-command – Benjamin W. Nov 28 '18 at 17:12
  • Or maybe you want [`inotifywait`](http://man7.org/linux/man-pages/man1/inotifywait.1.html). – Benjamin W. Nov 28 '18 at 17:14

0 Answers0