ping 2004-09-29 - By Anthony J Placilla
Back On Wed, 2004-09-29 at 12:46, Harry Hambi wrote: > Hi, > Is there a way of creating a file containing multiple ip > addresses???.then using one ping command get each ip In the file to > respond.I have about 20 ip's to check for a response. > > Rgds. > > Harry. >
create a colon separated list of IP addresses you need to ping & then do something like:
#!/bin/bash INLINE=listing.csv n=1 # server number
for name in $(awk 'BEGIN{FS=":"}{print $1}' < "$INLINE" ) do ping -c 1 -w 1 "$name" let "n += 1" done
exit 0
redirect the output to a file if you need it to save for later perusal
-- Tony Placilla, RHCT anthony_placilla@(protected) J.O.A.T.
perl -e 'print $i=pack(c5, (41*2), sqrt(7056), (unpack(c,H)-2), oct(115), 10);'
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ Valhalla-list mailing list Valhalla-list@(protected) https://www.redhat.com/mailman/listinfo/valhalla-list
|
|