^M 's in uploaded text files.

Rich Strebendt res at cbnewsc.ATT.COM
Sun Feb 4 10:49:16 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?

This is such a trivial problem, I expect to see at least 75000 replies
saying the same thing:

Type in the command 
	:%s/^V^M$//

where ^V is the CNTL-V combination, and ^M is the CNTL-M combination.
When you type the ^V, the character ^ will appear on the command line.
When you next type the ^M, the string ^M will replace the ^ character.

I suggest a session reading the vi manual and/or man pages.

					Rich Strebendt
					...!att!ihlpb!res



More information about the Comp.unix.questions mailing list