Script 'schedule': fix the use of sed on OSX.
This commit is contained in:
parent
08ea6f590c
commit
4dd38e1d4e
4
schedule
4
schedule
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user