Friday 5 March 2010

How to split a file by timestamp

This solution uses awk and is for logs in the typical apache format:

awk '$4 >= "[20/Feb/2010:00:00:00" && $4 <= "[20/Feb/2010:01:00:00" {print;}' < wap1
Now it would be nice to have a script that does that but in configurable intervals (in minutes)
The ultimate goal for me would be to count how many entries are there per groups of x minutes.

1 comment:

Anonymous said...

Hola Alex ¡

No entenc res....

Jordi