Checking if you are online - please help
Guys, could you please tell me if there is an easy way to check if you are online. I already know about PING, but i want something that i could do without having to ping any host. Can you not just say to your modem ("Are you connected to the internet?").
I am trying to build a bash program to count how long you have been online for.
Any help is appreciated,