[Level 1] Remove ^M by vi.

When you got a text file from Windows, you will see " ^M " at the end of the line.
That's because Windows use " CrLf " for line end, but OpenSolaris only use " Lf ".
If you want to remove ^M, you can use the command in last line mode of vi.

:1,$s/\r$//

Wish this helps.

regards,
Stanley Huang

Comments

Popular posts from this blog

[Level 1] Rar tool for Solaris.

[Level 2] iif in Python