Simple stuff, this post is here more as a reference than anything.
Problem
Windows puts '^M' characters throughout text files. I want to remove them.
Solution
The following commands will strip out the '^M' characters, and put the contents into a new file, then overwrite the original file.
To get the '^M' character, type Ctrl+V,Ctrl+Msed -e s/^M//g oldfile.txt > newfile.txt mv newfile.txt oldfile.txt
No comments:
Post a Comment