Re: Parse log files for data
From: Dan (agent_at_thwackspam.fathom.org)
Date: 08/01/04
- Next message: nyana: "Re: WWW::Mechanize work with Javascript .ASP?"
- Previous message: Dan: "Re: Parse log files for data"
- Maybe in reply to: Joe Smith: "Re: Parse log files for data"
- Next in thread: Jim Gibson: "Re: Parse log files for data"
- Reply: Jim Gibson: "Re: Parse log files for data"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 01 Aug 2004 06:02:13 GMT
On Sat, 31 Jul 2004 14:49:19 -0400, Mladen Gogala
<gogala@sbcglobal.net> wrote:
>On Sat, 31 Jul 2004 18:28:22 +0000, bowsayge wrote:
>
>> while (<$fh>) {
>> print if (/^query = (INSERT|UPDATE)/x);
>> }
>
>That will print the whole line. He wants to print just the part after
>INSERT or UPDATE.
Not just after, but including. If it grabs the whole line that's
fine. I can easily remove the " query= " from the beginning of each
line.
But at the moment it's not grabbing anything. It just lists all the
files at the end.
Here's a sample entry from one of the log files (just the beginning of
each line):
===00:23:54 on Mon July 26, 2004===
HTTP_REFERER=
HTTP_HOST= www.vi...
REQUEST_URI= /ult...
HTTP_USER_AGENT= Moz...
REMOTE_ADDR= 203...
query= INSERT INTO sc...
Spacing is slightly different, so I modified the regex accordingly to
(/^ query= (INSERT|UPDATE)/x) but it still found nothing.
- Next message: nyana: "Re: WWW::Mechanize work with Javascript .ASP?"
- Previous message: Dan: "Re: Parse log files for data"
- Maybe in reply to: Joe Smith: "Re: Parse log files for data"
- Next in thread: Jim Gibson: "Re: Parse log files for data"
- Reply: Jim Gibson: "Re: Parse log files for data"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|