^M 's in uploaded text files.

Arthur S. Kamlet ask at cbnews.ATT.COM
Wed Feb 7 06:06:31 AEST 1990


In article <1990Feb1.164704.23581 at athena.mit.edu> jik at athena.mit.edu (Jonathan I. Kamens) writes:

>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?

>  I don't know how to do it in vi; I use emacs :-) ("M-x replace-string
><RETURN> ^Q ^M <RETURN> <RETURN>").




In vi, do this:


:g/^V^M/s///


The <control>-V allows you to enter the <control>-M in the ex command
-- 
Art Kamlet  a_s_kamlet at att.com  AT&T Bell Laboratories, Columbus



More information about the Comp.unix.questions mailing list