Hi Friends,
I have experience in redhat/ Ubuntu OS, but I am very new to solaries os.
my servers OS is Oracle Solaris 10 8/11 s10x_u10wos_17b X86.
I have a file contains 200 servers IPs one by one.
now I want a script to chaeck which IPs are pinging, not pingning.
I prepared the below script.
HTML Code:
#!/bin/bash
#
#
while read line
do
/usr/sbin/ping $line > /dev/null
if [ $? == 0 ];
then
echo "$line is pinging"
else
echo "$line is not pinging"
fi
done < ipreport.txt
~
But the problem is ...if the ip is pinging, script moving to another IP, if IP is not pinging, script is getting strucked and not moving to next line.
please suggest me.
Thanks
Siva