Skip to content

Instantly share code, notes, and snippets.

@jrumbut
Last active October 6, 2015 20:02
Show Gist options
  • Save jrumbut/9a6b087a6987de337b7f to your computer and use it in GitHub Desktop.
Save jrumbut/9a6b087a6987de337b7f to your computer and use it in GitHub Desktop.
Get Hash Delimited Fields From Apache Logs
#!/bin/bash
#Usage cat access.log | ./hash-delimited_apache_logs
sed 's/^\(.*\) \(.*\) \(.*\) \[\(.*\)\] \"\([[:alpha:]]\+\) \(.*\) HTTP\/1\.1\" \(.*\) \(.*\) \"\(.*\)\" \"\(.*\)\"$/\1#\2#\3#\4#\5#\6#\7#\8#\9#\10/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment