This is the output I get (It mashes the original file all togther, and then appends the new line at the bottom):
AGENT Properties# The Properties in this section are unique to the “agent.properties” file.space.bootstrapables=stationtw.agent.changeBlockSize=500tw.agent.taskPriority=4tw.rpc.exec.threadPoolSize=4tw.agent.queueMax=10sun.net.client.defaultReadTimeout=1200000sun.net.client.defaultConnectTimeout=1200000sun.rmi.transport.tcp.threadKeepAliveTime=5000tw.server.host=compname2.domain.comtw.server.port=9898
This approach works especially well when paired with relevance substitution. In my environment, I built and/or edit a lot of properties and ini files on the fly that are customized to the machine/location/brand/etc.
appendfile echo property = {substitution for some local attribute} >> app_setup.ini
appendfile {concatenation of lines of file (parameter “filename”) & “%0d%0a” & “some new text” & “%0d%0a”}
I think you’re looking for something like…
appendfile {concatenation “%0d%0a” of lines of file (parameter “filename”) & “%0d%0a” & “some new text” & “%0d%0a”}
What’s happening is you’re reading the lines of a file and concatenating them together without a CRLF, which would be the separator. That’s probably why it got all jumbled together.