These are DOS / Windows end-of-line lines (to be pedantic, what they are usually called now, but most of the earlier non-UNIX systems like CP / M and OS / 2 had them too). In various Unices, end-lines \n . On DOS / Windows, line endings are \r\n (CR + LF or Carriage-Return and Line-Feed). \r is what appears as ^M To remove them in vim, I:
:%s/^M//
You can get ^ M by doing CTRL + V and then CTRL + M
If you are on a UNIX system, you can use dos2unix .
Vivin paliath
source share