From 600dfe3f99f3c1b72974ea1dadc18358694fa2e9 Mon Sep 17 00:00:00 2001 From: Kim Oliver Drechsel Date: Wed, 21 Aug 2019 14:20:24 +0200 Subject: [PATCH] Update tracert.sh Add new check if host is available --- tracert.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tracert.sh b/tracert.sh index 1e8a1c1..2d9f871 100755 --- a/tracert.sh +++ b/tracert.sh @@ -29,8 +29,7 @@ i=1 host=$1 while true; do - ping=$(ping -t $i -c 1 -W $timeout $host | grep -E "From|from") - + ping=$(ping -t $i -c 1 -W $timeout $host | grep -E "From|from") || exit 1 if [[ $(echo $ping | cut -d ' ' -f 1) == "64" ]] then #For last hop in route: