Skip to content

Instantly share code, notes, and snippets.

@alanreynosov
Created November 2, 2016 16:09
Show Gist options
  • Save alanreynosov/3e0d07d4be64c1c2147749fa046722c0 to your computer and use it in GitHub Desktop.
Save alanreynosov/3e0d07d4be64c1c2147749fa046722c0 to your computer and use it in GitHub Desktop.
sudo tail -fn0 /var/log/httpd/error_log | \
while read line ; do
echo "$line" | grep "[error]"
if [ $? = 0 ]
then
echo "Error from Apptest Regalli : $line" | mail -s "Error message email" help@regalii.com
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment