A little help with SED and embedded ^M please.

Mr. Video brown at nicmad.UUCP
Thu Apr 21 12:30:22 AEST 1988


In article <62 at dcs.UUCP> wnp at dcs.UUCP (Wolf N. Paul) writes:
<In article <5483 at sigi.Colorado.EDU> murillo at boulder.Colorado.EDU (Rodrigo Murillo) writes:
< > 
< >Also, I have recently had text files that have an emmbeded ^M char
< >at the end of every line.  I know this has something to do with
< >CR/LF conversion.  But how do I get rid of it? Thanks.
< >
<
<tr -d '\015' < infile > outfile
<
<This works on System V -- I don't know if the BSD version of tr(1) understands
<the -d option (== delete specified chars), or if it understands octal escapes.

We have a little utility written in C, for 4.3BSD, that will remove (delcr)
or add (addcr) carriage returns from/to a file.
-- 
	       harvard-\	       ihnp4--\
Mr. Video               !uwvax.................!nicmad!brown
	       rutgers-/  terminus-/  decvax--/



More information about the Comp.unix.questions mailing list