ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anderson, Rob (Global Trade)" <Rob.Ander...@nike.com>
Subject RE: Hostname in ant
Date Tue, 24 Aug 2004 21:36:48 GMT
Or if $HOSTNAME is set in your environment, you could use....

<property environment="env"/>

and refer to the hostname as "${env.HOSTNAME}".

-Rob Anderson

> -----Original Message-----
> From: Antoine Levy-Lambert [mailto:antoine@gmx.de]
> Sent: Tuesday, August 24, 2004 2:31 PM
> To: Ant Users List
> Subject: Re: Hostname in ant
> 
> 
> Use the exec task, command hostname, and use the outputproperty 
> attribute to capture what goes on stdout
> Cheers,
> Antoine
> 
> 
> 
> Gera, Prateek wrote:
> 
> >Hi,
> >  How can I get the hostname OR IP adress of a unix system 
> that ant runs
> >on. The environment variable HOSTNAME is not set, as may be 
> on some unix
> >systems.
> >
> >Thanks
> >./pr
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >For additional commands, e-mail: user-help@ant.apache.org
> >
> >
> >  
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message