That command returns the name of the newest file in the directory. I
want to put that string into a property.
The exec task seems to hate the fact that one of my arguments is a pipe.
Does anyone have a workaround?
I think I've tried every possible permutation of this:
<target name="getNewest">
<exec dir="${sourcedir}" executable="ls"
outputproperty="theNewestFile">
<!--
<arg line="-rt1 | tail -1"/>
-->
<arg line="-rt1"/>
<arg line="|"/>
<arg line="tail"/>
<arg line="-1"/>
</exec>
<echo message="The newest file in ${sourcedir} is:
${theNewestFile}"/>
</target>
|