ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Buonassisi, Vincent [Contractor]" <vbuon...@sprintspectrum.com>
Subject RE: make the echo task to print in a new line
Date Thu, 26 Dec 2002 15:18:37 GMT
You could use the built in property ${line.separator} (this comes from the
set of java system properties):

	<echo message="First line${line.separator}Second line"/>

or, you could create your own property for newline:

	<property name="nl"  value="&#13;&#10;"/>

hope this helps.

cheers,

vince

-----Original Message-----
From: Yaron Ruckenstein [mailto:yaron.ruckenstein@mobilitec.com] 
Sent: Thursday, December 26, 2002 7:45 AM
To: Ant-User
Subject: make the echo task to print in a new line

Hi,

I want to print a report to a file, and print each entry of it 
in a new line.

I know how to do it like this:

<echo message="first line" file="${report}"> 
<echo file="${report}" append="true">
</echo>
<echo message="second line" file="${report}" append="true"> 

But this way is not elegant, and the middle echo must be
in the begging of the line, and this breaks the indentation
(anyway my xml editor objects to it).

Is there any way a new line can be inserted ? 
(same as a unix echo where every call prints to a new line).

Thanks in advance,
Yaron




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

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


Mime
View raw message