Created
March 21, 2018 11:29
-
-
Save davidcrx/bef2e15f336eab204bcfb524e04577e8 to your computer and use it in GitHub Desktop.
Programa que comprueba si los hosts estan disponibles (mediante ping)
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
#Programa que comprueba si los hosts estan disponibles (mediante ping) | |
date | |
cat /home/davidcrx/list.txt | while read output | |
do | |
ping -c 1 "$output" > /dev/null | |
if [ $? -eq 0 ]; then | |
echo "node $output is up" | |
#dialog --msgbox "Todo correcto" 10 20 | |
else | |
echo "node $output is down" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment