Skip to content

Instantly share code, notes, and snippets.

@devn
Forked from marktriggs/analyze.clj
Created March 27, 2010 10:29
Show Gist options
  • Save devn/345914 to your computer and use it in GitHub Desktop.
Save devn/345914 to your computer and use it in GitHub Desktop.
(defn count-ips [logfile]
(remove empty?
(persistent! (reduce
#(assoc! %1 %2 (inc (get %1 %2 0)))
(transient {})
(of-IPs
(find-lines "Deny tcp src outside" logfile))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment