-
-
Save tinker1987/7a7f4fa9a9f5b5ddbcb6a41223b75a8a to your computer and use it in GitHub Desktop.
Color output of linux tail command
This file contains 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
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