^M 's in uploaded text files.

Tim Nelson tim at ncrcan.Toronto.NCR.COM
Sat Feb 3 01:59:50 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?

vi:  %s/.$/
     g/^V^M$/s///
sed: sed 's/.$//' infile >outfile
tr:  tr -d '\15' <infile >outfile

Any of these should work.


                       =====
tim nelson       | uucp        ...!uunet!attcan!ncrcan!tim
ncr canada       | internet     Tim.Nelson at Toronto.NCR.COM
(416) 826-9000   | 6865 Century Ave, Mississauga, Ontario, Canada L5N 2E2
                       =====
* Have a good day, and a great forever!                    * What?



More information about the Comp.unix.questions mailing list