From 9f50c47643080fcda0a1c0d229937f09fc737699 Mon Sep 17 00:00:00 2001 From: vonavi Date: Tue, 24 Sep 2013 22:05:56 +0300 Subject: [PATCH] Colorize digits in cyan. --- schedule | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/schedule b/schedule index 0a8d8f1..e46ef02 100755 --- a/schedule +++ b/schedule @@ -4,10 +4,10 @@ repo=fat0troll/lorchess tournament=autumn2013 # Variables -score='\(0\|1\|0\.5\):\(0\|1\|0\.5\)' +digit='[[:digit:]]' # Colors -green='\\033[01;32m' +cyan='\\033[01;36m' red='\\033[01;31m' restore='\\033[00m' @@ -38,7 +38,7 @@ for tour in $@; do echo elif [[ -z $name || `echo "$line" | egrep "Тур|=|Время|$name"` ]];then # Colorize output - line=$(echo "$line" | sed "s/${score}/${green}\0${restore}/g") + line=$(echo "$line" | sed "s/${digit}/${cyan}\0${restore}/g") [[ -n $name ]] && line=$(echo "$line" | sed "s/${name}/${red}\0${restore}/g") echo -e $line fi