Sometimes file automatic get post-fix by ^M in every line, and it can leads to hassle to hard to handle the files, which are related to code and can cause unexpected error in
code.
How to remove ^M from whole file.
Open terminal and locate the file
vim /root/Desktop/test.txt
(press escape)
(press :)
full command is :%s/ctrl+v+m//g
(press CTRL, V, M all together)
:wq
(save and exit)
and then enter. thats it.
code.
How to remove ^M from whole file.
Open terminal and locate the file
vim /root/Desktop/test.txt
(press escape)
(press :)
full command is :%s/ctrl+v+m//g
(press CTRL, V, M all together)
:wq
(save and exit)
and then enter. thats it.
No comments:
Post a Comment