A little help with SED and embedded ^M please.

Wolf N. Paul wnp at dcs.UUCP
Wed Apr 20 14:01:22 AEST 1988


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.
-- 
Wolf N. Paul * 3387 Sam Rayburn Run * Carrollton TX 75007 * (214) 306-9101
UUCP:  ihnp4!killer!dcs!wnp                    ESL: 62832882
INTERNET: wnp at EESDES.DAS.NET or wnp at dcs.UUCP   TLX: 910-280-0585 EES PLANO UD



More information about the Comp.unix.questions mailing list