Thanks Matthew & Graeme.
I found that the "/ERROR/ && !/CRITICAL ERROR/" method gave me exactly what I required.
Thanks very much for both replies.
I verified it using a simple script
Code:
$ cat log
panic
halt
kern.error
ERROR
CRITICAL ERROR: Resetting HP Advanced System Management Stack
$ cat perltest.pl
#!/usr/bin/perl -w
use strict;
open (IN, "log");
while (<IN>)
{
if ((/kern.error|halt|ERROR|panic/) && (!/CRITICAL ERROR/))
{
print $_
}
}
close IN;
$ ./perltest.pl
panic
halt
kern.error
ERROR