Pinging script question
I want to make a script that pings different PC's in a network by using the last digits in the IP adresses.
For example if I use my script "./script.sh 1 50 100" it will ping to the 3 pc's with those IP adresses (192.168.129.1, 192.168.129.50 and 192.168.129.100) in my network (192.168.129.0/24).
So if I test this, for example: ./script.sh 1 50 100
I want the output to be something like this:
192.168.129.1 Ping Succes
192.168.129.50 Ping Failure
192.168.129.100 Ping Succes
2 of the 3 PC's are up: 66% is running.
Could anyone give me some help with this?
Thanks in advance.