Created
August 26, 2019 10:27
-
-
Save filiperfernandes/6a02a424716432887160a6db5fae51ab to your computer and use it in GitHub Desktop.
Test Server conenctivity
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 | |
# Program name: pingall.sh | |
# Author: https://askubuntu.com/users/127327/souravc | |
# Source: https://askubuntu.com/questions/413367/ping-multiple-ips-using-bash | |
date | |
cat thesis-servers.txt | while read output | |
do | |
ping -c 1 "$output" > /dev/null | |
if [ $? -eq 0 ]; then | |
echo "node $output is up" | |
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