Home ›
Fix messy Mac-style line endings to have proper Unix text file formatFix messy Mac-style line endings to have proper Unix text file format
Submitted by Benjamin Melançon on January 23, 2009 - 7:51am
Searched words:
vi convert line endings ^M
MacVim corrected carrot em characters mashed together in one line
CR LF new line right encoding carriage return broken
correct M
In a vi text editor as reached from the command line shell with vi filename.txt or an excellent GUI such as MacVim, enter:
:%s/\r/\r/g
and your file will be beautiful, even if only parts of it were messed up with ^M non-working line breaks.
Thanks to the comment at this post.
Resolution
More like this
- File upload not working on Mac OS X development environment
- How to copy files using the command line
- Keep .DS_Store files out of your Git projects when developing on a Mac
- Disable problem module through the database via command line mysql
- Upping memory command line PHP memory limits so you can use Drush


Comments
Post new comment