Simple (?) awk, two delimiters
I am trying to compile a list of IP addresses, timestamps, and useragents to my site. My log format is as follows:
Code:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined awk '{print $1, $4, $5}' gets me the IP address and timestamp. awk -F\" '{print $6}' gets me the full useragent. Is there a way to combine the two into one awk command? Or is there a fast/easy way to run the two awks separately and correlate the two lists? |
I have written numerous Perl scripts to parse these files, and have not yet found a one-line (or even a small number of lines) way of splitting the fields cleanly (too many delimiters used). I cannot see how such a format could have been adopted as any kind of standard.
Here's hoping someone comes forward with a clean solution in some regex-supporting language. --- rod. |
Quote:
|
Quote:
|
All times are GMT -5. The time now is 01:35 PM. |