I mostly need to ping range of ips and some times more then 100 ips, and pinging them one by one is a time consuming task. Here is the script to do them quickly.
1 2 3 4 5 6 7 |
#!/bin/bash for i in 192.168.1.{241..248} do ping -c 1 -t 1 "$i" >/dev/null 2>&1 && echo "Ping Status of $i : Success" || echo "Ping Status of $i : Failed" done |
You can replace 192.168.1 with your ip range, and 241 and 248 with start and end of ip range
Comment Policy:
Your words are your own, so be nice and helpful if you can. Please, only use your real name, not your business name or keywords. Using business name or keywords instead of your real name will lead to the comment being deleted. Anonymous commenting is not allowed either. Limit the amount of links submitted in your comment. We accept clean XHTML in comments, but don't overdo it please.