Linux bash to iterate over apache access_log files and send mail
问题 I need a linux bash script which send me an email if any results appear in searches made in the apache logs. I have a very simple method (sentence) to look into SQL Injection attacks, which simply searches for some keywords used in SQLi. Is this: #tail -50000 /var/vhosts/site.com/logs/access_log | egrep -i "select%20|union%20|'|1=1" So now I would like to be able to launch it in several access_log (for each website - virtual host I have) and send me an email in case of finding results. In a