in reply to CISCO Log file pattern matching (again!)
i would do it like this...
while (<DATA>) { next unless index '%SEC-6-IPACCESSLOG', $_; @f = split /(?:[:,]*\s+:?|\/)/; print join($/, @f), $/; } __DATA__ Aug 22 11:46:27 masterudp003210uds.netops.msnyuhealth.org 148526: Aug +22 15:46:26 UTC: %SEC-6-IPACCESSLOGDP: list 101 denied icmp 10.4.12.2 + 53 -> 10.7.151.48 :8/0:, 1 packet
$ perl log.pl Aug 22 11:46:27 masterudp003210uds.netops.msnyuhealth.org 148526 Aug 22 15:46:26 UTC %SEC-6-IPACCESSLOGDP list 101 denied icmp 10.4.12.2 53 -> 10.7.151.48 8 0 1 packet
inserting various checks on the fields after splice or shifting off of the front (probably a switch of some sort on the %PROCESS doing the logging)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: CISCO Log file pattern matching (again!)
by blue_cowdawg (Monsignor) on Aug 25, 2003 at 18:24 UTC | |
by zengargoyle (Deacon) on Aug 25, 2003 at 19:17 UTC |