Created
October 12, 2023 05:27
-
-
Save muhamad-ridwant-tech/60923701090362710b71a425216ccf64 to your computer and use it in GitHub Desktop.
multiple ping with bash
This file contains 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 | |
# ping | |
echo " " | |
echo Mengirim Ping ! | |
echo "Tanggal : $(date)" | |
echo " " | |
cat node.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