Monday, August 11, 2014

GREP: colored output

http://stackoverflow.com/questions/17236005/grep-output-with-multiple-colors

EXAMPLE:  Colored output from asterisk CLI

 asterisk -rvvvvvvv | GREP_COLOR='01;36' egrep --color=always '^.*answered SIP.*$|$' | GREP_COLOR='01;31' egrep -i --color=always '^.*Got SIP response.*$|$' | grep -E '(answered SIP|Got SIP response)'

No comments:

Post a Comment