The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 10-24-2008
Lasthitlarry Lasthitlarry is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 6
Thanks, now I can tell it is running the ping, and I went ahead and modified my code to this now:

#! /bin/ksh
List=pinglist1.txt

cat $List | while read ip
do
Pingable=""
ping -c 2 $ip | awk '/100%/ {print "no"}' |read Pingable
if [ "$Pingable" != "no" ]
then
print $ip "PINGS">>pingresults.txt
else
print $ip "DOESN'T PING">>pingresults.txt
fi
done


AND the results:
UX:sh (ping1.sh): ERROR: print: not found

Do I need to have a print.pl or something uploaded to that directory?