Re: what is ^M at the end of a line?
[email protected] ("Remy Guo")
| Newsgroups | perl.beginners |
|---|---|
| Message-ID | <[email protected]> |
it's done! great~ :) \r can match the ^M. thanks all~ Microsoft costs me several hours.... -_- 2008/5/21 Bob McConnell <[email protected]>: > From: Rob Coops > > > That ^M is a line feed, or well the windows version of a line feed. > > Actually, it is an ASCII CR or carriage return. Microsoft uses CR/LF for > end of line, where Unixen use just LF. Apple used something else, but > may have changed when they switched to OSX. I used tr to clean it up, > much like dos2unix does. I think the command was: > > $ tr "\r\n" "\n" < badfile > goodfile > > Bob McConnell >