Skip to content

Instantly share code, notes, and snippets.

@fguillen
Created January 15, 2014 20:13
Show Gist options
  • Save fguillen/8443638 to your computer and use it in GitHub Desktop.
Save fguillen/8443638 to your computer and use it in GitHub Desktop.
tail -f /var/log/nginx.log | awk '
/status:"2.."/ {print "\033[32m" $0 "\033[39m"}
/status:"5.."/ {print "\033[31m" $0 "\033[39m"}
/status:"[^25].."/ {print $0}
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment