You could try this DIM mycmd AS String DIM myIP AS String
mycmd = "ifconfig| grep -w 'inet addr' | grep -v '127.0.0.1' | cut -d: -f2| awk '{print $1}'" SHELL mycmd TO myip PRINT myip Have not confirmed what it returns but by the looks it returns the local assigned ip. Not the wan side. On Wed, 2009-09-09 at 19:12 +0200, Jean-Yves F. Barbier wrote: > Benoît Minisini a écrit : > >> On Wednesday 09 September 2009, Benoît Minisini wrote: > >>>> mmmm it's OK, I think there must be something like User.IP :) > >>>> > >>>> Regards > >>>> > >>>> > >>>> -- > >>>> David > >>> The IP address is not related to the user at all. > >> How about System.IP? > >> > >> > >> However David Villalobos did not tell which IP he wants. > >> I do have a IP at the incomming connection of my building. > >> For me known as WAN and a IP at the box, known to me as LAN. > >> > >> http://www.myipaddress.com for your WAN IP address :) > >> > >> Best regards, > >> > >> Ron_1st > >> > > > > IP address are attached to network interfaces, and I'm not sure that a > > network > > interface could not have several IP, and different types of IPs. > > yep, that's right. > ie: you can easily attach multiple IP adresses to an Ethernet interface as > aliases, > thus having one ethernet HW I/F that have 10 different IP addresses. > > > Instead of adding thousands lines of code to the interpreter, I think the > > better is parsing the output of the ifconfig command. > > that's right too, many programs/scripts return different strings, obliging > the dev to consider each possible return > > JY ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user