Created
January 9, 2019 13:49
-
-
Save larshb/05054d4b63c9d0410da4142bffcc5fd2 to your computer and use it in GitHub Desktop.
A shell script (using awk) to colorize output of svn status (st)
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
# Based on colorize (https://unix.stackexchange.com/a/318779) | |
awk ' | |
function color(c,s) { | |
printf("\033[%dm%s\033[0m\n",30+c,s) | |
} | |
/?/ {color(1,$0);next} | |
/M/ {color(3,$0);next} | |
{print} | |
' $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment