Any awk or sed gurus?

James

0
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!
 
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.
 
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.
 
Back
Top