Highlight score.

This commit is contained in:
vonavi 2013-09-23 15:04:10 +03:00
parent f5bfd586ae
commit d34236e105

View File

@ -4,6 +4,9 @@ myname=iVS
repo=fat0troll/lorchess
tournament=autumn2013
# Variables
score='\(0\|1\|0\.5\):\(0\|1\|0\.5\)'
# Colors
green='\\033[01;32m'
red='\\033[01;31m'
@ -34,8 +37,9 @@ for tour in $@; do
echo ">>>"
curl -q --silent $url | egrep "Тур|Время|$name" | while read line;do
# Colorize the player name
output=$(echo $line | sed "s/${name}/${red}${name}${restore}/g")
echo -e $output
# Colorize output
line=$(echo $line | sed "s/${score}/${green}\0${restore}/g")
line=$(echo $line | sed "s/${name}/${red}\0${restore}/g")
echo -e $line
done
done