[olug] How to remove ^M's from files?

Shaughn shaughn at emosai.net
Thu Dec 11 16:26:41 UTC 2003


Thanks for everyones suggestions...

cat <in_file> | col -bx > <out_file>

actually seemed what I wanted, :) I had to figure out how to do it from bsd.

thanks for everyones help!

Sean Kelly wrote:

>On Thu, Dec 11, 2003 at 09:34:59AM -0600, Shaughn wrote:
>  
>
>>i have a bunch of web pages that have ^M's as the end because they 
>>weren't saved correctly.
>>
>>I vaguely remember a command line trick to get rid of these?
>>
>>anyone know that?
>>    
>>
>
>tr -d "^M" < infile > outfile
>
>Note that you have to quote that ^M to be able to type it. Try ^V^M.
>
>  
>



More information about the OLUG mailing list