pingall.sh
#!/bin/sh
SERVERLIST=serverlist.txt
if [ -e $SERVERLIST ]; then
for SERVER in `cat $SERVERLIST`; do
trap 'exit 0' 2
ping -c2 $SERVER
echo
done
fi
#!/bin/sh
SERVERLIST=serverlist.txt
if [ -e $SERVERLIST ]; then
for SERVER in `cat $SERVERLIST`; do
trap 'exit 0' 2
ping -c2 $SERVER
echo
done
fi