--- Stefan Bodewig <[EMAIL PROTECTED]> wrote:
> Laramie Crocker <[EMAIL PROTECTED]> wrote:
>
> > Does anyone know how to get stdout from a task (either exec or an
> > extension of org.apache.tools.ant.Task) such that I can set a
> > property with the output?
>
> Short of writing your onw task? Don't think so.
>
> The easiest way probably is to make the task write the output to a
> file (exec has an out attribute for this) and then write a simple task
> that reads this file and sets a property from it.
If you're not into writing a task to do it, you could do something like:
<target name="setprop">
<exec executable="echo" output="today.properties">
<arg value="-n"/>
<arg value="today="/>
</exec>
<exec executable="sh">
<arg line="-c " date +%A >> today.properties ""/>
</exec>
</target>
then just read today.properties in with the regular <property file=...>
Diane
=====
([EMAIL PROTECTED])
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/