Remove ^M from text files in Linux

Use

sed -e ‘s/^M//g’ file

where ^M is the crtl-m character

normally inserted by typing Ctrl-V Ctrl-M

Alternatively, grab dos2unix from somewhere.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.