From 3a0172936c9b87fca7c99624dc1a6691ed5a42c2 Mon Sep 17 00:00:00 2001 From: Levon Gevorgyan Date: Sun, 17 Nov 2024 18:28:41 -0600 Subject: [PATCH] fix plot error --- scripts/estimate_fg.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/estimate_fg.sh b/scripts/estimate_fg.sh index d65d4c7..6860001 100755 --- a/scripts/estimate_fg.sh +++ b/scripts/estimate_fg.sh @@ -223,7 +223,7 @@ plot() { # get sum of bitrate percentages for GRAIN in "${GRAINS[@]}" do - COMPARE_BITRATE="$(echo "$GRAINS_FOR_FILE" | tr -d ' ' | grep "grain:$GRAIN" | cut -d':' -f3)" + COMPARE_BITRATE="$(echo "$GRAINS_FOR_FILE" | tr -d ' ' | grep -w "grain:$GRAIN" | cut -d':' -f3)" BITRATE_PERCENTAGE="$(echo "$COMPARE_BITRATE / $BASELINE_BITRATE" | bc -l)" # fix NULL BITRATE_SUM for first comparison test -n "${BITRATE_SUMS[$GRAIN]}" || BITRATE_SUMS["$GRAIN"]=0 @@ -256,7 +256,7 @@ plot() { linetype 1 linewidth 2 \ pointtype 7 pointsize 1.5; \ plot '$PLOT' with linespoints linestyle 1 - " + " | less } test "$PLOT" == 'true' && test -f "$GRAIN_LOG" && \