John Machin wrote:
> [EMAIL PROTECTED] wrote:
>> is there a simple way in perl, python, or awk/shell/pipe, that gets
>> the user agent field in a apache log?

> If you don't like that, just hang about -- there's sure to be a 
> pyparsing bus coming by real soon now :-)

While we're waiting for the pyparsing bus, here's the shlex train:

import shlex
line = """blah blah blah"""
print shlex.split(line)[10]

HTH,

--
Carsten Haese
http://informixdb.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to