Created
December 6, 2019 05:03
-
-
Save hoangdh/495e311fd008add77dc05c1bc066dd46 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
#!/bin/bash | |
IP_LIST=( sv304 sv305 sv306 sv307 sv309 sv310 sv312 sv313 sv314 ) | |
for i in "${IP_LIST[@]}"; do | |
ping -c 2 "$i"; | |
if [ $? -eq 0 ] | |
then | |
echo "0 PING_$i Network agent of $i is OK" | |
else | |
echo "2 PING_$i Network agent of $i is not OK, pls check" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment