You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ro...@i2.com on 2002/04/05 07:07:43 UTC

problem with ctrl + M characters

Hi all,
I have this problem with ctrl + M characters which appear as (^M)
in unix. I have a lotta files which contain these characters because the
files have not been saved in unix format.
The number of files is really large and so i cannot possibly save each 
file to
unix format as it would take a lotta my time and it wouldn't be feasible.
Please let me know if there's something in ant which can be used to 
recursively do this in
a particular diretory or jar file.
This would be of immense help to me as some work is held up due to this.
This problem occurs the build creation procees is done in WINNT and 
deploying can be done on any OS.
Regards,
Rosmon


"Man was designed for accomplishment, engineered for Success and endowed 
with seeds of greatness"

Re: problem with ctrl + M characters

Posted by Trent C TeSelle <tr...@fanniemae.com>.
Quick way that I use...

  tr -d "\015" < $inputfile > $inputfile



Rosmon_Sidhik@i2.com wrote:

>Hi all,
>I have this problem with ctrl + M characters which appear as (^M)
>in unix. I have a lotta files which contain these characters because the
>files have not been saved in unix format.
>The number of files is really large and so i cannot possibly save each 
>file to
>unix format as it would take a lotta my time and it wouldn't be feasible.
>Please let me know if there's something in ant which can be used to 
>recursively do this in
>a particular diretory or jar file.
>This would be of immense help to me as some work is held up due to this.
>This problem occurs the build creation procees is done in WINNT and 
>deploying can be done on any OS.
>Regards,
>Rosmon
>
>
>"Man was designed for accomplishment, engineered for Success and endowed 
>with seeds of greatness"
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: problem with ctrl + M characters

Posted by Stefan Bodewig <bo...@apache.org>.
On Fri, 5 Apr 2002, Rosmon Sidhik <Ro...@i2.com> wrote:

> Please let me know if there's something in ant which can be used to
> recursively do this in a particular diretory or jar file.

<http://jakarta.apache.org/ant/manual/CoreTasks/fixcrlf.html>

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: problem with ctrl + M characters

Posted by stephan beal <st...@wanderinghorse.net>.
On Friday 05 April 2002 07:07 am, Rosmon_Sidhik@i2.com wrote:
> The number of files is really large and so i cannot possibly save each
> file to
> unix format as it would take a lotta my time and it wouldn't be feasible.

There are probably easier ways to do this but here's one simple way:

for i in $(find . -type f -name "*.txt"); do
  echo Converting $i from Windows to Unix line-ending format...
  recode ibmpc..lat1 $i
done


----- stephan
Generic Unix Computer Guy
stephan@einsurance.de - http://www.einsurance.de
Office: +49 (89)  552 92 862 Handy:  +49 (179) 211 97 67
"Wenn ich weniger Bock haette, wuerde ich nicht Atmen."

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>