Remove ctrl-m characters on Linux
Use CTRL
+V
CTRL
+M
to type ^M
vi:
:%s/^M//g
tr:
tr -d ^M < file > newfile
sed:
sed 's/^M//g' file > newfile
Read other posts
Use CTRL
+V
CTRL
+M
to type ^M
vi:
:%s/^M//g
tr:
tr -d ^M < file > newfile
sed:
sed 's/^M//g' file > newfile