Created
July 17, 2015 22:53
-
-
Save pfultz2/c008f1a57665ac426833 to your computer and use it in GitHub Desktop.
Colorize gcc output
This file contains hidden or 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
| #!/bin/bash | |
| while read x ; do echo $x ; done \ | |
| | sed -e "s/.*error:.*/\x1b[1;36m&\x1b[0m/" \ | |
| -e "s/.*warning:.*/\x1b[1;36m&\x1b[0m/" \ | |
| -e "s/^\(.*\)\(required from\)/\x1b[1;36m\1\x1b[0mnote: \2/" \ | |
| -e "s/^\(.*\)\(In instantiation of\)/\x1b[1;36m\1\x1b[0mnote: \2/" \ | |
| -e "s/^\(.*\)\(In member\)/\x1b[1;36m\1\x1b[0mnote: \2/" \ | |
| | sed -e "s/error:/\x1b[1;31m&\x1b[1;36m/" \ | |
| -e "s/warning:/\x1b[1;35m&\x1b[1;36m/" \ | |
| -e "s/note:/\x1b[1;30m&\x1b[0m/" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment