The UNIX and Linux Forums  


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 -->
  #1 (permalink)  
Old 01-05-2009
popeye popeye is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 25
How do I ping each element

@listip is a list of ips

my $PING = "/usr/sbin/ping";

for ($lindex = 0; $lindex <= $#listip; $lindex++) {
print $listip[$lindex] . "\n";
$PING $listip[$lindex] ;
}