geek.shrek has asked for the wisdom of the Perl Monks concerning the following question:
I tried to use grep, but I have no luck and I don't have any idea how to range the time."02-feb-2010","04:59:12;09 ","00:00:06;27 " ,"ABC1234 " +,"ABC1234","ABC1234","610A/03","00:08:19;28 ","00:08:26;24.","02-feb- +2010","04:59:19;06 " "02-feb-2010","04:59:19;06 ","00:00:15;00 " ,"creeid00402 + ","OY00402W","OY00402W","610D/00","04:00:00;00 ","04:00:14;29.","02 +-feb-2010","04:59:34;06 " "02-feb-2010","04:59:34;06 ","00:29:01;25 " ,"ihw-14ubc-q + ","3316291-","3316291-","610E/00","03:00:00;00 ","03:29:01;24.","02 +-feb-2010","05:28:35;29 " "02-feb-2010","05:28:35;29 ","00:00:15;00 " ,"creeid00402 + ","OY00402W","OY00402W","610D/00","04:00:00;00 ","04:00:14;29.","02 +-feb-2010","05:28:50;29 " "02-feb-2010","05:28:50;29 ","00:00:30;00 " ,"scifim10078 + ","SF10078W","SF10078W","610F/00","02:00:00;00 ","02:00:29;29.","02 +-feb-2010","05:29:21;01 " "02-feb-2010","05:29:21;01 ","00:00:15;00 " ,"creeid00402 + ","OY00402W","OY00402W","610D/00","04:00:00;00 ","04:00:14;29.","02 +-feb-2010","05:29:36;01 "
I also triedgrep -e "(.*),("05:.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*)"
Can someone help me please. Thanks,my @lines = (); push @lines, $_ if /(.*),("05:.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*), +(.*),(.*)/; foreach my $line (@lines) { print "LINE : " . $lines[0] ." \n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Filter log file within time range
by toolic (Bishop) on Feb 03, 2010 at 23:47 UTC | |
|
Re: Filter log file within time range
by apl (Monsignor) on Feb 04, 2010 at 13:31 UTC |