Colorize digits in cyan.
This commit is contained in:
parent
9e04cd5868
commit
9f50c47643
6
schedule
6
schedule
@ -4,10 +4,10 @@ repo=fat0troll/lorchess
|
|||||||
tournament=autumn2013
|
tournament=autumn2013
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
score='\(0\|1\|0\.5\):\(0\|1\|0\.5\)'
|
digit='[[:digit:]]'
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
green='\\033[01;32m'
|
cyan='\\033[01;36m'
|
||||||
red='\\033[01;31m'
|
red='\\033[01;31m'
|
||||||
restore='\\033[00m'
|
restore='\\033[00m'
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ for tour in $@; do
|
|||||||
echo
|
echo
|
||||||
elif [[ -z $name || `echo "$line" | egrep "Тур|=|Время|$name"` ]];then
|
elif [[ -z $name || `echo "$line" | egrep "Тур|=|Время|$name"` ]];then
|
||||||
# Colorize output
|
# 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")
|
[[ -n $name ]] && line=$(echo "$line" | sed "s/${name}/${red}\0${restore}/g")
|
||||||
echo -e $line
|
echo -e $line
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user