File Each line has a ^ M character found in the vi editor

| - Introduction

  Copy a file from the window to be opened with vim linux found that each row has a character ^ M

^ Origin and role of M characters:
  in DOS / Windows, the text file is a newline \ r \ n, and in the linux system, compared with \ n,
  so the DOS / Windows in the edited text file to linux, every and his party are more than a ^ M.
  So just a newline ^ M, there is no practical use,

^ M How do I delete it?

  In the command mode,
    enter% s / \ r // g

Guess you like

Origin www.cnblogs.com/xuzhaoping/p/11073987.html