analyzing httpd-error.log

Mel Flynn mel.flynn+fbsd.questions at mailing.thruhere.net
Mon Mar 30 14:09:14 PDT 2009


On Monday 30 March 2009 22:55:35 Charles Howse wrote:

> grep "$date" httpd-error.log | grep -v 192.168.254.254 | grep -v
> 192.168.254.3 > /root/err.log

Using pcregrep, installed by devel/pcre, typically available on apache 
systems:
pcregrep "$date.* \[client (?!192\.168\.254)" /var/log/httpd-error.log | \
	mail -s"Error log for $date" charles

Should work. As far as I know, look ahead assertions aren't supported by re(7) 
or the extended version.
-- 
Mel


More information about the freebsd-questions mailing list