[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: logcheck oddity

On 2004.08.09 15:53, Juha Pahkala wrote:

Aug  9 16:40:01 server /USR/SBIN/CRON[1103]: (root) CMD
Aug  9 16:40:01 server /USR/SBIN/CRON[1104]: (root) CMD

ie. every five minutes a check that the relevant processes are alive.
the line in the default installation:

^\w{3} [ :0-9]{11} [._[:alnum:]-]+ /USR/SBIN/CRON\[[0-9]+\]:
\([[:alnum:]-]+\) CMD \(.*\)$

Sure that is the same regex that worked for the second line? Seems you got the [[:alnum:]] wrong both times. The class of alphanumeric characters is named [:alnum:]. If you want to have a range of just alphanumerical characters, you've got to use [[:alnum:]]+. So this should work:

^\w{3} [ :0-9]{11} [[:alnum:]]+ /USR/SBIN/CRON\[[0-9]+\]: \([[:alnum:]] +\) CMD \(.*\)$

Best regards,


Reply to: