your regex appears to be off.

Also, it is much easier to so something like:

awk ‘{ sum += $10 } END { print sum }’ access_log

From the command line. You are guaranteed that *nix will have awk. Never know if you’ll have python.


Reply

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text.
  • Images can be added to this post.
  • You may use [inline:xx] tags to display uploaded files or images inline.
More information about formatting options