Skip to content

Instantly share code, notes, and snippets.

@chmodx
Created April 27, 2016 12:59
Show Gist options
  • Save chmodx/90fc69cb13e9537f317a955b8156e87e to your computer and use it in GitHub Desktop.
Save chmodx/90fc69cb13e9537f317a955b8156e87e to your computer and use it in GitHub Desktop.
awk -vDate=`date --date="$(date +%b) $(date +%d) $(date +%Y) 8:00" +[%d/%b/%Y:%H:%M:%S` -vDate2=`date --date="$(date +%b) $(date +%d) $(date +%Y) 10:00" +[%d/%b/%Y:%H:%M:%S` '$4 > Date && $4 < Date2 && ($9 ~ /502/) {printf "Time: %s, Response: %d, Size: %d, Request: %s\n",$4,$9,$10,$7}' access.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment