[SlugBug] perl help required - helix server log parsing

Bill Best bill at commedia.org.uk
Fri Jun 18 19:51:24 BST 2004


Chris J wrote:

<snips>

> Try this instead then. It could be that the two spaces between the date/time
> and the "GET ..." is causing problems (next four as one):
> 
> 	sed -e 's/^\(.*\[.*\].*\)\[\(.*\)\] \[.*\] \[.*\].*/\1\"-\" \"\2\"/'
> 		-e 's/  / /g'
> 		< helix_log_file.log
> 		> sane_log_file.log
> 
> This replaces /all/ instances of two spaces with a single space. To only
> home in on the one in the leadup to the GET we can try replacing the second
> substitute expression (the 's/  / /g') with: 's/  \(\"GET\)/ \1/'
> 
> Try one (or both) and see if that helps?

hooray - i believe that this works (your first suggestion above).

still wrestling a bit with some other parts of the puzzle but no 
complaints yet from webalizer.

many thanks for this - it's a great help.

cheers

bb


More information about the SlugBug mailing list