" 1. Load file into vi " 2. Be sure to use the for this to work " 3. :1,$s///g " Basically this starts at line 1, to end of file ($), substitutes (s) ^M with empty (//), repeating on same line ok (g) :1,$s/^M//g