Hi,
I am new to shell scripting and I am facing a challenge. I need a shell script to find a specific error in log file and send email alert automatically. Below are the details.
- I am using WinSCP to view the log files.
- I need to find 'out of memory' error from an application log file. The path will be /app/hard_coder/logs/Sys01/application.log
- The script will run for every 4 hours using cron tab and check the error for the last 4 hours.
- If out of memory error is found, it should send an alert saying 'out of memory error found' to 'example@abc.com' . If there are no errors it should send an alert saying ;'everything is fine'.
Reply tab is open for your suggestions.
Thanks !!