Shell script to ping multiple hosts

Script to ping multiple host .

first step follows

create a .txt file with hostnames

for example

hostname1 or ip
hostname2 or ip

copy below script into a file and name it as

#author :
#copy rights@smartproteam 2009
#script to ping multiple hosts

#for loop
for i in cat `cat ~/ping.txt`
fping $i | grep unreachable

Now change the permissions of the script file to all excutable

chmod +x

then run it as


Related Posts with Thumbnails

Leave a Reply

Your email address will not be published. Required fields are marked *



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Comment moderation is enabled. Your comment may take some time to appear.