[Gambas-user] Obtain my IP with Gambas

Jean-Yves F. Barbier 12ukwn at ...626...
Wed Sep 9 17:44:14 CEST 2009


David Villalobos Cambronero a écrit :
> Hi, is there an easy way to obtain my IP address?

by shell, I use:
ifconfig | grep inet | cut -d: -f2 | cut -d' ' -f1 | grep -v 127

if you have multiple interfaces, you must add (for each unwanted): 
| grep -v nnn.nnn.nnn.nnn
at the end

HTH
JY
-- 
I don't mind what Congress does, as long as they don't do it in the
streets and frighten the horses.
		-- Victor Hugo




More information about the User mailing list