ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Clark <Robert.Cl...@quest.com>
Subject Re: echo "something" >> somefile
Date Thu, 04 Mar 2004 22:42:40 GMT
On Thu, 2004-03-04 at 17:23, Matt Reason wrote:
> Is there a way to append a single line at the end of a file?  Or do I
> need to call exec?   Why would echo in ant have been designed
> differently than echo in all other languages?
>  
> Thanks in advance,
>  
> Matt
>  
> <!-- This keeps appending to the same line. -->
> <target name="logit">
>   <echo file="log" append="true">${buildNum} ${BuildDate}.</echo>
> </target>

Try:

<echo file="log" append="true">
${buildNum} ${BuildDate}.</echo>

To append a new line and then the text or the other way around:

<echo file="log" append="true">${buildNum} ${BuildDate}.
</echo>

to append the text and then a new line.

- Rob



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


Mime
View raw message