Hi Christian,
grep -c <keyword> <file-mask eg. *.log>
> or if you are looking for only stuff for today for eg then
> grep <date> | grep -c <keyword> <file-mask>
>
I don't see how that will produce figures per hour!
That would be the simplest implementation. For a python implementation
> think about dictionaries with multiple layers like {Date: {Keyword1: Count,
> Keyword2: Count}. Essentially you would just iterate over the file, check
> if the line contains your keyword(s) that you are looking for and then
> incrementing the counter for it.
>
OK.
Laomao
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor