Skip to content

Instantly share code, notes, and snippets.

@ElMesa
ElMesa / taillog.sh
Last active September 3, 2021 19:37 — forked from masonwan/grep-color.sh
Colorize logs
tail -200 catalina.out | \
ack-grep --flush --passthru --color --color-match=red "^.*ERROR.*" | \
ack-grep --flush --passthru --color --color-match=green "^.*DEBUG.*" | \
ack-grep --flush --passthru --color --color-match=blue "^.*INFO.*"
####################################################################
# Colors available
#
# From Stackoverflow: http://stackoverflow.com/a/9626444
# Thanks to Andy Lester: http://stackoverflow.com/users/8454/andy-lester