Skip to content

Instantly share code, notes, and snippets.

@indrayam
Last active August 29, 2015 14:11
Show Gist options
  • Save indrayam/57a1148e248c23cc3a88 to your computer and use it in GitHub Desktop.
Save indrayam/57a1148e248c23cc3a88 to your computer and use it in GitHub Desktop.
Using Awk to process Atlassian Stash Log Files
# Grab the time, the userid and the git version
cat atlassian-stash-access.log | awk -F'[|]' '($4 ~ /[:lower:]/) && ($7 ~/"" "git*/) {print $5, $4, $7;}' > phase1.txt
# Parse the git version number from the git details
cat phase1.txt | awk '{print $1, $2, $3, $5}' | sed s/\"//g > phase 2.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment