From c911364e7ba7c3cf48d2de7d63e696cadf11c0cf Mon Sep 17 00:00:00 2001 From: Logan Lipke Date: Fri, 10 Apr 2020 16:48:03 -0700 Subject: [PATCH] Fixed inaccurate pattern matching --- lf_l4_reset.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lf_l4_reset.sh b/lf_l4_reset.sh index d3d4d57a..b32e3c84 100755 --- a/lf_l4_reset.sh +++ b/lf_l4_reset.sh @@ -80,8 +80,8 @@ while : ; do #echo "$endp_status" #echo '---------------------------------------' - l4read=`echo "$endp_status" | awk '/Bytes Read/ {print $8}'` - l4write=`echo "$endp_status" | awk '/Bytes Written/ {print $8}'` + l4read=`echo "$endp_status" | awk '/Bytes Read:/ {print $8}'` + l4write=`echo "$endp_status" | awk '/Bytes Written:/ {print $8}'` runChk=`echo "$endp_status" | grep '^L4Endp '` runStat=`echo "$runChk" | sed 's/L4Endp \[.*\] (\(.*\))/\1/'` @@ -106,8 +106,8 @@ while : ; do echo "Unknown case ${i}[$runStat]" ;; esac - - if (( $checkSpeed == 1 )); then + if [[ x$checkSpeed = x1 ]]; then + #echo "l4read[$l4read] min[$min] l4write[$l4write]" if (( $l4read <= $min )) && (( $l4write <= $min )); then doL4Restart=1 fi