Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement