From e7acdb61238b1f4d876aea87709c6ac3923eab13 Mon Sep 17 00:00:00 2001 From: Koki Shinjo Date: Sun, 15 Oct 2023 20:08:47 +0900 Subject: [PATCH] [cross] add LANG=C for ping reachability check --- jsk_unitree_robot/cross/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsk_unitree_robot/cross/install.sh b/jsk_unitree_robot/cross/install.sh index 56da7c1b6f..2ac8a123f4 100755 --- a/jsk_unitree_robot/cross/install.sh +++ b/jsk_unitree_robot/cross/install.sh @@ -54,7 +54,7 @@ function copy_data () { fi # Check if robot is reachable - reachability=$(ping -c4 ${hostname} 2>/dev/null | awk '/---/,0' | grep -Po '[0-9]{1,3}(?=% packet loss)') + reachability=$(LANG=C ping -c4 ${hostname} 2>/dev/null | awk '/---/,0' | grep -Po '[0-9]{1,3}(?=% packet loss)') if [ -z "$reachability" ] || [ "$reachability" == 100 ]; then echo "ERROR: ${hostname} unreachable" 1>&2 exit 2