Extracting values from your apache log.

Body

Don't try to understand this, It'll lead to brain cancer ;-)

Just use it to extract things from your apache web server access log.

perl -n -e '/(.[^ ]*) -(.[^-]*)- \[(\d*)\/(\w*)\/(\d*):(\d*):(\d*):(\d*) (.[^\]]*)\] "(\w*) (.[^ ]*) .[^"]*" (\d*) (.[^ ]*) "(.[^"]*)" "(.[^"]*)"/; print "$1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 \n"' access.log

This is the base to build my apache log to mysql atabase script.

Add new comment

The content of this field is kept private and will not be shown publicly.