mirror of
https://github.com/aclist/dztui.git
synced 2024-12-28 05:12:36 +01:00
Add timeout message to table
This commit is contained in:
parent
f4c10fbe4f
commit
0b74605b4b
1 changed files with 1 additions and 0 deletions
1
dztui.sh
1
dztui.sh
|
@ -57,6 +57,7 @@ check_ping(){
|
|||
if [[ $ping -eq 1 ]]; then
|
||||
ping_ip=$(echo -e "$i" | awk -F'\t' '{print $2}' | awk -F: '{print $1}')
|
||||
ms=$(ping -c 1 "$ping_ip" | awk -Ftime= '/time=/ {print $2}')
|
||||
[[ -z $ms ]] && ms="Timeout" || :
|
||||
printf "%s\t%s\n" "$i" "$ms"
|
||||
else
|
||||
printf "%s\n" "$i"
|
||||
|
|
Loading…
Reference in a new issue