Colorize tail outputs with this nifty alias
Thanks to hacker news, I came across an article with some interesting “tricks” to do with the linux shell.
A very valuable trick is to colorize output that’s handled by grep, rather egrep.
alias grepc='egrep --color=always'
A usage example would be:
tail -f /var/log/messages | grepc -i 'Warning'
Remember your regex, ^ is start of line, $ is end of line. So append one or the other like ‘^|warning’ to show all the lines, and colorize the included string… append another string with another ‘^|warning|error’.