Update tracert.sh

Add new check if host is available
This commit is contained in:
Kim Oliver Drechsel 2019-08-21 14:20:24 +02:00 committed by GitHub
parent c3b7343c91
commit 600dfe3f99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: