Skip to content

Instantly share code, notes, and snippets.

@ianrumford
Created September 28, 2012 12:59
Show Gist options
  • Save ianrumford/3799669 to your computer and use it in GitHub Desktop.
Save ianrumford/3799669 to your computer and use it in GitHub Desktop.
Cascalog print auditd log file
(ns aud_cas.print_file
(:use cascalog.api))
(defn print-file
"Use cascalog to print a file"
[file-path]
(let [file-tap (lfs-textline file-path)]
(?<- (stdout) [?line] (file-tap :> ?line))))
(defn -main
"Entry point"
[file-path]
(println "Printing file" file-path)
(print-file file-path)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment