Skip to content

Instantly share code, notes, and snippets.

@tinker1987
Forked from kartikshah/tail-color.sh
Last active September 11, 2017 08:36
Show Gist options
  • Save tinker1987/7a7f4fa9a9f5b5ddbcb6a41223b75a8a to your computer and use it in GitHub Desktop.
Save tinker1987/7a7f4fa9a9f5b5ddbcb6a41223b75a8a to your computer and use it in GitHub Desktop.
Color output of linux tail command
tail -100f var/logs/dev.log | awk '
/INFO/ {print "\033[32m" $0 "\033[39m"}
/ERROR|Exception/ {print "\033[31m" $0 "\033[39m"}
/DEBUG/ {print "\033[33m" $0 "\033[39m"}
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment