title: append to each line in a file in ant
body: <p>I'm trying to do some minor file manipulation in ant. I retrieve a list of tablespaces that I'd like to prepend with ALTER TABLESPACE  and append with NOT LOGGED like so:</p>
  
  <pre><code>    &lt;loadfile property="zos.prepend.tablespaces" srcFile="${basedir}/zos-tablespaces-DIRTY.txt"&gt;
        &lt;filterchain&gt;
          &lt;!-- Order here is important --&gt;
          &lt;prefixlines prefix="ALTER TABLESPACE "/&gt;
          &lt;suffixlines suffix=" NOT LOGGED"/&gt;
          &lt;trim/&gt;
          &lt;replaceregex pattern=".*NAME.*|.*-----.*|.*record.*select.*|^ALTER TABLESPACE$" replace=""/&gt;
          &lt;trim/&gt;
          &lt;ignoreblank/&gt;
        &lt;/filterchain&gt;
      &lt;/loadfile&gt;
  
      &lt;echo file="${basedir}/zos-tablespaces-PREPEND.txt"&gt;
          ${zos.prepend.tablespaces}
      &lt;/echo&gt;
  </code></pre>
  
  <p>When I do this, I get the prepending ok, but the appending seems to append to the next line. Any ideas how to do the prefix and suffix?</p>