Created
August 19, 2016 08:30
-
-
Save leewin12/b81ed908238536f985c83d6728b012c6 to your computer and use it in GitHub Desktop.
check dead ip(or hostname) using shell ping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !/bin/bash | |
# ips: ip list file | |
# ./find_dead.sh > dead.log | |
# cat dead.log | grep -v ttl | awk '{ print $1 }' | |
IPS=`cat ips` | |
for i in $IPS; do | |
CODE=`ping -c 1 $i ` | |
echo $i $CODE | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment