Linux, Script

Multi IP Ping Host Table

Create bash script to quick ping all the hosts from ip list text file.

By using basic command grep & ping,  one script to check unlimited Host live or not by ping response.
[[email protected] ~]$ vi ip.txt

[[email protected] ~]$ vi
—– Copy Script —–

 grep -v "#" ip.txt | awk '{print $1}' | while read host
 ping -c 1 $host

Note: Do not keep blank lines in file other wise your and your mileage may differ slightly.
Give executable permission to .sh script
[[email protected] ~]$ chmod +x
Run the script
[[email protected] ~]$ sh
Get the output

By getting this output you will see the host response.