Last active
March 22, 2021 05:18
-
-
Save ottaviano/8f446c96079b70455fa987fd25f713cd to your computer and use it in GitHub Desktop.
Supertail - tail with colors
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
... | |
supertail() { | |
tail -f $@ | sed \ | |
-e 's/\(.*\[info\].*\)/\o033[32m\1\o033[39m/' \ | |
-e 's/\(.*INFO\:.*\)/\o033[32m\1\o033[39m/' \ | |
-e 's/\(.*\[err\].*\)/\o033[31m\1\o033[39m/' \ | |
-e 's/\(.*ERROR\:.*\)/\o033[31m\1\o033[39m/' \ | |
-e 's/\(.*CRITICAL\:.*\)/\o033[31m\1\o033[39m/' \ | |
-e 's/\(.*EMERGENCY\:.*\)/\o033[31m\1\o033[39m/' \ | |
-e 's/\(.*\[warning\].*\)/\o033[33m\1\o033[39m/' \ | |
-e 's/\(.*WARNING\:.*\)/\o033[33m\1\o033[39m/' \ | |
-e 's/\(.*\[debug\].*\)/\o033[34m\1\o033[39m/' \ | |
-e 's/\(.*DEBUG\:.*\)/\o033[34m\1\o033[39m/' | |
} | |
alias supertail=supertail |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment