Skip to content

Instantly share code, notes, and snippets.

@churib
Created March 12, 2014 10:15
Show Gist options
  • Save churib/9504210 to your computer and use it in GitHub Desktop.
Save churib/9504210 to your computer and use it in GitHub Desktop.
#!/bin/sh
perl -pe 's/(\[.*?\] ){3}(.*?), referer.*/$2/'
@churib
Copy link
Author

churib commented Mar 12, 2014

or 's/([.?] ){3}(.?)($|, referer.*)/$2/' depending on log format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment