^M 's in uploaded text files.

Mike Van Pelt mvp at v7fs1.UUCP
Fri Feb 2 12:27:54 AEST 1990


In article <5622 at udccvax1.acs.udel.EDU> william at vax1.acs.udel.EDU (William H. York) writes:
>I use my PC to write text files in word perfect then I save in dos format
>to upload to our vax.  When the file is cat'ed, the ^M's don't show, but
>when vi'ing they become real annoying!  Is there a file I can pipe it 
>through to remove the ^M's or perhaps a way vi can be used to remove them?

If you just want a way to do this in vi, I use the following all
the time:    :s/^M//g

The trick is getting the ^M in the search string.  You do this by
pressing <CONTROL>-V, followed by carriage return or <CONTROL>-M.
^V is vi's quoting character.
-- 
Mike Van Pelt                     "I'm not a biologist, but I play one in 
Headland Technology/Video 7        front of Congressional hearings."
...ames!vsi1!v7fs1!mvp                        -- Meryl Streep



More information about the Comp.unix.questions mailing list