The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
FreeBSD Support
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Previous Message  |  Next Message 
 how to get rid of ^M in textfiles?
Author: g2k 
Date:   13-08-01 18:28

i know there are tools for this out there, but i dont know any by name. so can anyone tell me a program to get rid of those ^M at the end of each line in a textfile?

^Ms get there when textfiles are created with any windows texteditors..not that i use them, but i currently have to work with a lot of these files, around 77Megs.

i'd use perl to get rid of them, but unfortunately pattern matching ^M (s/^M+$//g;) wont work for some reason..

 Reply To This Message  |  Forum List  |  Flat View   Newer Topic  |  Older Topic 

 Topics Author  Date
 how to get rid of ^M in textfiles?   new
g2k 13-08-01 18:28 
 Re: how to get rid of ^M in textfiles?   new
Erin 13-08-01 18:37 
 Re: how to get rid of ^M in textfiles?   new
g2k 13-08-01 19:05 
 Re: how to get rid of ^M in textfiles?   new
Daniel Schrock 14-08-01 22:06 
 Re: how to get rid of ^M in textfiles?   new
el_kab0ng 14-08-01 22:53 
 Re: how to get rid of ^M in textfiles?   new
Erin 13-08-01 18:40 
 Re: how to get rid of ^M in textfiles?   new
g2k 13-08-01 19:00 
 Re: how to get rid of ^M in textfiles?   new
Ryan Masse 13-08-01 18:46 
 Re: how to get rid of ^M in textfiles?   new
Dan Langille 13-08-01 20:47 
 Re: how to get rid of ^M in textfiles?   new
Dan Langille 13-08-01 20:54 
 Re: how to get rid of ^M in textfiles?   new
Jay 14-08-01 15:40 
 Re: how to get rid of ^M in textfiles?   new
el_kab0ng 14-08-01 17:41 
 Re: how to get rid of ^M in textfiles?   new
Jay 14-08-01 18:09 
 Re: how to get rid of ^M in textfiles?   new
Don 16-08-01 01:38 
 Re: how to get rid of ^M in textfiles?   new
Alan Fox 23-02-02 19:50 
 Re: how to get rid of ^M in textfiles?   new
Dan Langille 15-01-03 02:22 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org