The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Ping text file of ip addressese and output to text file
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Ping text file of ip addressese and output to text file
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
11
(
permalink
)
10-24-2008
avis1981
Registered User
Join Date: Oct 2008
Location: NC
Posts: 21
Can you try this one:
#! /bin/ksh
IPLIST=`cat ./pinglist1.txt`
for ip in $IPLIST
do
echo $ip
ping -c 2 $ip >>log.txt
if [[ $? -eq 0 ]]
then
print $ip "PINGS">>pingresults.txt
else
print $ip "DOESN'T PING">>pingresults.txt
fi
done
avis1981
View Public Profile
Find all posts by avis1981
Find avis1981's past nominations received
Find avis1981's present nominations given