Any awk or sed gurus?

James

Storage is cool
Joined
Jan 24, 2002
Messages
844
Location
Sydney, Australia
I'd like to write a gawk (or whatever) script to parse a web server log file and produce a very basic report once a month.

The program would go through the log and extract all the lines which show a PDF file being downloaded. Then delete any GETs from 2 specific IP addresses. Finally, it would then produce a count for each PDF file downloaded - ie. /full/path/to/pdffile.pdf - downloaded 1455 times this month.

Or a preconfigured Analog config file, whatever, I'm not fussy. The log file is from an MS IIS box and is about 400MB long per month.

TIA!
 

Mercutio

Fatwah on Western Digital
Joined
Jan 17, 2002
Messages
21,607
Location
I am omnipresent
I'm not a guru but I have a whole book about sed and awk I probably haven't looked at in five years or so. Maybe I can point you in the right direction.
 

James

Storage is cool
Joined
Jan 24, 2002
Messages
844
Location
Sydney, Australia
I can do the first few just using grep. The issue is the count of each PDF file downloaded - as I said, maybe something like Analog is better but I can't see the option to give stats on just one type of file.
 
Top