AdminNoteBook
Search This Blog
Monday, July 26, 2021
Ping multiple servers - Linux
#
!/bin/bash
date
cat
/tmp/servers.txt
|
while
read server1
do
ping
-c 1 "$server1"
>
/dev/null
if
[ $
?
-eq 0 ]; then
echo
"$server1 is UP"
else
echo
"$server1 is DOWN "
fi
done
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment