ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Abley" <james.ab...@gmail.com>
Subject Re: Running exec tast
Date Sun, 23 Nov 2008 21:11:06 GMT
2008/11/20 Rez <pons32@hotmail.com>:
>
> Hi
>
>
> I can run the below command from a Windows cmd line just fine
> cvs -f stat | grep "Repository revision" | gawk '{print $4 " " $3}'
> but now I'd like to add it to my build.xml file in a target
>
> <target name="stat"> <exec executable="cmd">  <arg value="/c"/>   
  <arg line="cvs -f stat | grep "Repository revision" | gawk '{print $4 " " $3}'"/>
</exec></target>
>
> I've changed the double quotes with " and single quotes with ' and every other combination
imaginable and I still get errors.  Please help.
>

Hi,

I think you need to experiment with redirectors[1] to see if you can
accomplish what you're trying to do. You're trying to use shell pipes,
which ANT doesn't know about. You need to explicitly send the output
of one <exec/> to another one. From my reading of the manual, I think
this should be possible.

Cheers,

James

[1] http://ant.apache.org/manual/CoreTypes/redirector.html

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


Mime
View raw message