net/mwan3: replace legancy backticks

Replace legancy backticks syntax shell execution with braces.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
Florian Eckert 2018-05-11 08:28:57 +02:00
parent 5f068b7fb3
commit 7962bfd3df
1 changed files with 3 additions and 3 deletions

View File

@ -122,12 +122,12 @@ main() {
ping -I $DEVICE -c $count -W $timeout -s $size -q $track_ip &> /dev/null ping -I $DEVICE -c $count -W $timeout -s $size -q $track_ip &> /dev/null
result=$? result=$?
else else
ping_result=`ping -I $DEVICE -c $count -W $timeout -s $size -q $track_ip | tail -2` ping_result="$(ping -I $DEVICE -c $count -W $timeout -s $size -q $track_ip | tail -2)"
loss=`echo "$ping_result" | grep "packet loss" | cut -d "," -f3 | awk '{print $1}' | sed -e 's/%//'` loss="$(echo "$ping_result" | grep "packet loss" | cut -d "," -f3 | awk '{print $1}' | sed -e 's/%//')"
if [ "$loss" -eq 100 ]; then if [ "$loss" -eq 100 ]; then
latency=999999 latency=999999
else else
latency=`echo "$ping_result" | grep -E 'rtt|round-trip' | cut -d "=" -f2 | cut -d "/" -f2 | cut -d "." -f1` latency="$(echo "$ping_result" | grep -E 'rtt|round-trip' | cut -d "=" -f2 | cut -d "/" -f2 | cut -d "." -f1)"
fi fi
fi fi
;; ;;