ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <>
Subject Re: <env> task?
Date Wed, 05 Nov 2003 23:42:14 GMT
On Thu, 6 Nov 2003 04:55 am, Tony Zhang wrote:
> I didn't get any reply, not sure if my message went
> out. So let me try again.
> Is there a task or way to get the return result of
> running a command?  For example, store the
> result of unix command 'pwd' to an envionment
> variable.

The following will get the output of pwd into an Ant property (NOT an 
environment variable).

<project name="test" default="test">
  <target name="test">
    <exec executable="pwd" outputproperty="pwd.out"/>
    <echo message="Output of PWD is ${pwd.out}"/>


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message