Why not use shellscript?
<typedef uri="antlib:net.sf.antcontrib">
<classpath>
<fileset dir="${user.home}/apps/ant-contrib" includes="*.jar"/>
</classpath>
</typedef>
<typedef uri="antlib:net.sf.antcontrib">
<classpath>
<fileset dir="${user.home}/apps/ant-contrib" includes="*.jar"/>
</classpath>
</typedef>
<ac:shellscript shell="bash" outputproperty="form.list">
cat deploy.properties | grep .js-version| sed
s/.js-version=v.[0-9]*/,/g | tr -d '\n' | sed s/,$//g
</ac:shellscript>
<echo>Form list: ${form.list}</echo>
Peter
On 8/20/07, Vihan Pandey <[EMAIL PROTECTED]> wrote:
> > Have you tried execs outputproperty or redirectors?
>
> I'm having some trouble getting the pipes within the arg line :
>
> i.e
> ---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<----
> <exec executable="cat">
> <arg value="${deployroot}/deploy.properties" />
> <redirector outputproperty="redirector.out">
> <outputmapper type="merge" to="redirector.out"/>
> </redirector>
> </exec>
>
> <echo message="this is ${redirector.out}" />
> ---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<----
>
> will show me all of the contents of my deploy.properties
>
> But something like this :
>
> ---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<----
> <exec executable="cat">
> <arg value="${deployroot}/deploy.properties" />
> <arg value="|" />
> <arg value="/bin/gerp .js" />
> <redirector outputproperty="redirector.out">
> <outputmapper type="merge" to="redirector.out"/>
> </redirector>
> </exec>
>
> <echo message="this is ${redirector.out}" />
> ---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<----
>
> fails.
>
> I tried arg line via bash :
>
> ---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<----
> <exec executable="/bin/bash">
> <arg line='-f "cat ${deployroot}/deploy.properties | grep .js | sed
> s/.js-version=v.[0-9]*/,/g | tr -d \n"' />
> <redirector outputproperty="redirector.out">
> <outputmapper type="merge" to="redirector.out"/>
> </redirector>
> </exec>
>
> <echo message="this is ${redirector.out}" />
> ---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<----
>
> that gives a no "No such file or directory"
>
> If i try :
>
> ---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<----
> <exec executable="/bin/cat">
> <arg line="${deployroot}/deploy.properties | /bin/grep .js |
> /bin/sed s/.js-version=v.[0-9]*/,/g | tr -d '\n' " />
> <redirector outputproperty="redirector.out">
> <outputmapper type="merge" to="redirector.out"/>
> </redirector>
> </exec>
> ---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<----
>
> This fails as well.
>
> Any suggestions?
>
> Regards,
>
> - vihan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]