Created
June 4, 2015 06:33
-
-
Save carld/c17750c9eec4cb9215c0 to your computer and use it in GitHub Desktop.
sed regex to parse apache combined log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat access.log | sed 's/^\([0-9\.]\+\) \([^ ]\+\) \([^ ]\+\) \[\(.*\)\] \("[^"]*"\) \([^ ]*\) \([^ ]*\) \("[^"]*"\) \("[^"]*"\).*/"\1"\t"\2"\t"\3"\t"\4"\t\5\t"\6"\t"\7"\t\8\t\9/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment