1
Fork 0

Script 'schedule': fix the use of sed on OSX.

master
vonavi 2014-04-20 22:29:00 +04:00
parent 08ea6f590c
commit 4dd38e1d4e
1 changed files with 2 additions and 2 deletions

View File

@ -184,12 +184,12 @@ info_output_term() {
if [[ -n "$PLAYER" ]]; then
players=$(grep -o "[^ ]*${PLAYER}[^ ]*" <<< "$line")
for name in $players; do
line=$(sed "s/${name}/\\$(tput setaf 1)\0\\$(tput sgr0)/g" <<< "$line")
line=$(sed -E "s/(${name})/\\$(tput setaf 1)\1\\$(tput sgr0)/g" <<< "$line")
done
fi
# Highlight result
line=$(sed "s/\(1-0\|0-1\|1\\/2\)/\\$(tput setaf 6)\0\\$(tput sgr0)/g" <<< "$line")
line=$(sed -E "s/(1-0|0-1|1\\/2)/\\$(tput setaf 6)\1\\$(tput sgr0)/g" <<< "$line")
echo "$line"
done