Line ending symbols is a never ending issue born a long time ago.
Unix (and Linux) uses a simple \n new line character while Windows and Mac OS X use \n\r (new line – carriage return) and \r (carriage return only) respectively.
If you open a non Unix file within the great text editor VIM, it probably shows up with a bunch of ^M characters at the end of every line (where ^ means CTRL). You can easily remove them with a common replace command as follows:
:%s/^V^M/\r/g
Related posts:
- Regular expressions basics In computing, regular expressions, also referred to as regex or...
- Dynamic DNS with Linux using ddclient My router had a respectable lifetime but sometimes it is...
- Moving files from Windows to Linux rewriting name case Filename case doesn’t matter on Microsoft Windows and Apple Mac...
Related posts brought to you by Yet Another Related Posts Plugin.

>
4 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.
This is help me a lot
Thx again
Yes that \n \r in OS X I keep forgetting
Thanks
Continuing the Discussion