Last active
July 11, 2019 09:50
-
-
Save danitfk/fbdd462db3834e9aa0da7de68b3ccd57 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
ips="10.233.64.0 | |
10.233.65.0 | |
10.233.70.0 | |
10.233.71.0 | |
10.233.66.0 | |
10.233.69.0 | |
10.233.67.0 | |
10.233.68.0 | |
10.233.73.0 | |
10.233.72.0" | |
IP=$(ifconfig flannel.1 | grep inet | awk {'print $2'} | grep 10.) | |
echo "$HOSTNAME - $IP" | |
for ip in $ips | |
do | |
ping $ip -c1 -W1 > /dev/null | |
status=$(echo $?) | |
if [[ "$status" == "0" ]]; then | |
echo "$IP -> $ip - OK" | |
else | |
echo "$IP -> $ip - NOT OK" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment