You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by LeSamourai <le...@gmail.com> on 2011/10/03 18:21:27 UTC

How to remove ctrl-M characters in unix files

I couldn't find any documentation or information after googling regarding how
ant handles this special character.  I've been trying to use the replace and
replaceregexp tasks but have had no luck. Any help is appreciated.

--
View this message in context: http://ant.1045680.n5.nabble.com/How-to-remove-ctrl-M-characters-in-unix-files-tp4865533p4865533.html
Sent from the Ant - Users mailing list archive at Nabble.com.

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


RE: How to remove ctrl-M characters in unix files

Posted by jose urena <jo...@hotmail.com>.
in the ant manual, look up details for filterschain

this should work for you
<deletecharacters chars="./"/>

      

  <loadfile property="Anchor" srcfile="/etc/default/Loc_Env_Anchor"
failonerror="false">
    <filterchain>
      <deletecharacters chars="./"/>
      <expandproperties />
      <ignoreblank />
      <striplinecomments />
      <trim />
    </filterchain>
  </loadfile>

-----Original Message-----
From: LeSamourai [mailto:lesamourai.cc@gmail.com] 
Sent: Monday, October 03, 2011 5:19 PM
To: user@ant.apache.org
Subject: Re: How to remove ctrl-M characters in unix files

Got it, used the fixcrlf task.  Now one more question, how do I escape "./"?

I want to remove actual "./" in files.

--
View this message in context:
http://ant.1045680.n5.nabble.com/How-to-remove-ctrl-M-characters-in-unix-fil
es-tp4865533p4866623.html
Sent from the Ant - Users mailing list archive at Nabble.com.

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



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


Re: How to remove ctrl-M characters in unix files

Posted by LeSamourai <le...@gmail.com>.
Got it, used the fixcrlf task.  Now one more question, how do I escape "./"? 
I want to remove actual "./" in files.

--
View this message in context: http://ant.1045680.n5.nabble.com/How-to-remove-ctrl-M-characters-in-unix-files-tp4865533p4866623.html
Sent from the Ant - Users mailing list archive at Nabble.com.

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