I am trying to replace all occurrences of a carriage return ("\x0D") using a simple ant task, all *.sh files in the test directory. It does not seem to do the trick.
This is my script; am I doing something wrong? (It seems the global flag, g, does not help either)
<?xml version='1.0'?>
<project name="myproject" default="cr_remover" basedir=".">
<target name="cr_remover">
<replaceregexp match="\x0D" replace="" flags="g" byline="true">
<fileset dir="."><include name="**/*.sh"/></fileset>
</replaceregexp>
</target>
</project>
This will work:
May I ask why you are not using FixCRLF task?