Skip to content

Instantly share code, notes, and snippets.

@dmgig
Created January 14, 2015 14:47
Show Gist options
  • Save dmgig/703a22b96c3acc6ca416 to your computer and use it in GitHub Desktop.
Save dmgig/703a22b96c3acc6ca416 to your computer and use it in GitHub Desktop.
awk: count matching rows in log file
awk '/Sep 07/ {total += 1} END {print "total requests = " total}' /var/log/requests.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment