[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 2] Shell Interactive With Zenity Episode 5 -- list

[Level 2] iif in Python