ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raja Nagendra Kumar" <Nagendra.Ku...@erasmic.com>
Subject instert or append a new line using replace task
Date Thu, 26 May 2005 06:14:34 GMT
Hi All,

I am looking for a solution on how to add a new line to existing file as a
fall back approach I want to use replace as below to add the new line
Enable-Cheat-Codes: true

But \n in the new replaced string is not interpreted as new line. Any help
please..


<replace file="${test.jad.fileName}" token="Default-Sound: OFF"
value="Default-Sound: OFF \n Enable-Cheat-Codes: true"/>

or

         <replaceregexp match="Default-Sound: OFF" replace="Default-Sound:
OFFEnable-Cheat-Codes: true" byline="true">
         <fileset file="${test.jad.fileName}"/>
        </replaceregexp>

Regards,
Nagendra


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


Mime
View raw message