On Monday February 12, 2007, "Peter Reilly"
<[EMAIL PROTECTED]> wrote:
> On 2/12/07, James Abley <[EMAIL PROTECTED]> wrote:
> > Probably something like:
> >
> > <exec executable="/usr/bin/svn">
> > <arg line="info" />
> > <arg line="|" />
> > <arg line="/bin/grep" />
> > <arg line="Revision" />
> > </exec>
>
> or:
> <exec executable="sh">
> <arg value = "-c"/>
> <arg value="ls -rtla | grep build"/>
> </exec>
> (note: in the second example, one does not need to use
> single quotes, also this will probably not work in windows with
> cygwin).
In this specific case, a redirector on the exec task with an output
filter will duplicate the behaviour of piping through grep and has
the benefit of being cross-platform. Something like:
<exec executable="svn">
<arg value="info"/>
<redirector outputproperty="svninfo">
<outputfilterchain>
<linecontains>
<contains value="version"/>
</linecontains>
</outputfilterchain>
</redirector>
</exec>
- Rob
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]