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 
 Re: how to get rid of ^M in textfiles?
Author: Jay 
Date:   14-08-01 18:09

IIRC, the ^M is the second character for CRLF, which DOS uses. *nix only uses one of either CR or LF (carriage return, line feed). Or maybe not... For all I know, binary uses both and ascii uses one. I'm not going to be writing a text editor anytime soon, so its not too much of a concern (reinventing the wheel is a waste of my time, I'm an admin, not a serious developer).

I just use the tools I have to convert between the two (dos2unix). It's rather quick, takes about 2 seconds to convert every file in the /www dir on my webserver (140+ files).

 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