Created
November 4, 2013 16:30
-
-
Save Espenhh/7305254 to your computer and use it in GitHub Desktop.
Fargelegger output rødt/gult for en vilkårlig kommando basert på warn/error i loggene
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 | |
COMMAND="mvn run whatever kommandoen din for å kjøre er" | |
RED=$(echo -e '\033[41m\033[37m') | |
YELLOW=$(echo -e '\033[43m\033[37m') | |
NORMAL=$(echo -e '\033[0m') | |
$COMMAND | sed -e "s/.*WARN.*/$YELLOW&$NORMAL/" -e "s/.*ERROR.*/$RED&$NORMAL/" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment