Skip to content

Instantly share code, notes, and snippets.

@oakaigh
Last active July 14, 2019 04:43
Show Gist options
  • Save oakaigh/70cad1f0f930d172d138610e4c3716d0 to your computer and use it in GitHub Desktop.
Save oakaigh/70cad1f0f930d172d138610e4c3716d0 to your computer and use it in GitHub Desktop.
pping() { for a in $@; do drtt=86; rtt=$(ping -qc1 $a 2>&1 | awk -F/ '/^rtt/ { printf "%.2f\n", $5; ok = 1 } END { if (!ok) print "FAIL" }'); (( $(awk 'BEGIN {print ("'$rtt'" <= "'$drtt'")}') )) && echo -e "$a\t$rtt"; done; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment