Two basic things to know:
- echo task
- The ant property ${line.separator}
<echo message="First line. ${line.separator}" file="test_file.txt"/>
<echo message="Second line ! ${line.separator}" file="test_file.txt" append="true"/>
Notice the "append" attribute on the second echo!
That's all!
Source:
https://ant.apache.org/manual/Tasks/echo.html
how to add text matching a patter at a line
ReplyDelete