^M 's in uploaded text files.

Dave Pridgen dave at dsachg1.UUCP
Sat Feb 3 04:30:11 AEST 1990


>From article <5622 at udccvax1.acs.udel.EDU>, by william at vax1.acs.udel.EDU (William H. York):
> 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?
> 
> Any help would be appreciated.
> 
> William at vax1.udel.edu

Your upload protocol should remove the <carriage return> characters for you 
since they are not used in unix (unix uses the newline character).  You have
many choices: switch to a protocol that strips the <cr>, or use any of the
Unix filter programs.
Here is one written in tr.  --     tr -d '\015'
Just pipe your file through that. and that should solve your problem.


David Pridgen
Unify Corporation
Site Consultant
 
My opinions are my own.



More information about the Comp.unix.questions mailing list