Last active
August 29, 2015 14:11
-
-
Save indrayam/57a1148e248c23cc3a88 to your computer and use it in GitHub Desktop.
Using Awk to process Atlassian Stash Log Files
This file contains hidden or 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
# 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