Created
May 11, 2015 19:46
-
-
Save jlongman/07d5ec6d643644c18ad3 to your computer and use it in GitHub Desktop.
colour code stdout/stderr
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
#!/bin/bash | |
echo -en "\033[31m" ## red | |
eval $* | while read line; do | |
echo -en "\033[36m" ## blue | |
echo $line | |
echo -en "\033[31m" ## red | |
done | |
echo -en "\033[0m" ## reset color |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment