-------- Original Message -------- Subject: Re: How to retrieve IP address From: Dominique Devienne <ddevie...@gmail.com> To: Ant Users List <user@ant.apache.org> Date: Mon Jan 31 2011 16:08:21 GMT+0100 (CET)
> On Mon, Jan 31, 2011 at 2:03 AM, hezjing <hezj...@gmail.com> wrote: >> May I know if it is possible to retrieve the IP address of the running >> server in Ant? > > Google found it for me in Antelope, a 3rd party collection of Ant tasks: > > http://antelope.tigris.org/nonav/docs/manual/bk03ch16.html > > Might be possible with pure Ant too, not sure where though. --DD Simply use a shell wrapped up in <exec> task, output caught via outputproperty for further processing, f.e. = /sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}' Windows user may use ipconfig .. Regards, Gilbert --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org