Hi!
it seems that my ISP ( LAN based internet ) has blocked pinging of
internet hosts. I am unable to ping google,yahoo etc.

I need it to check whether I am connected to internet. Is there any other
way to check if I am connected to Internet ?

Also how to find out the current IP address of my PC ?
/sbin/ifconfig does give the IP address, but suppose I've to use it in a
script, how do I get it ?

I've written this small script to get the IP address :

/sbin/ifconfig | grep inet | sed -n 1p | tr -s " " |cut -f3 -d " "|cut -f2
-d ":"

Is there simpler way to do it ? Also ifconfig is unavailable for normal
users, so the above script won't be useful for non-root users.

Please guide,


-- 
Nikhil Joshi
http://nikhil.ne1.net

-- 
http://mm.ilug-bom.org.in/mailman/listinfo/linuxers

Reply via email to