playing with VI editor

This might be helpful to you:

How to remove ^M characters (they are end of line DOS's characters) from a file in vi:

type this

where ^V is control-v and ^M is control-m.

is the basic search and replace command in vi and the command you typed will look like this
:%s/^M//g. It will replace what is between the first and second / with what is between the 2nd and 3rd /. Between the first and second slash, we have ^M and between the second and third we have an empty string since we are replacing with an empty string.

means to replace all occurences.


Popular posts from this blog

converting videos with ffmpeg

Chrome dev tools - secret weapon?