Skip to content

Ping Script

This is a basic Ping Script :

It first pings the 192.168.1.1

then pings the 192.168.2.1
after that it pings the 8.8.8.8
and finally pings the www.google.com address

Why does it pings 1.1 and 2.1 ?

Because my friend wanted to use it in different areas, ( he his not familiar with the shell ) for example at work 1.1 and home 2.1.

Why does it pings 8.8.8.8 and google.com ?

Similar as above  8.8.8.8 is the DNS of google, and google.com is just there, because I like it.

How does it work ? :

Execute the script.sh and it will print out  5 pings to 1.1  and write the result in GREEN / RED and then 5 pings to 2.1 and the result in GREEN / RED
and so one.

The script :

So have fun 😉

Post a Comment

Your email is never published nor shared. Required fields are marked *