Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!husc6!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.unix.questions Subject: Re: removing end of line mark with sed Message-ID: <13143:Aug2116:59:3390@kramden.acf.nyu.edu> Date: 21 Aug 90 16:59:33 GMT References: <1990Aug19.194911.16628@fs-1.iastate.edu> <768@studsys.mu.edu> Distribution: usa Organization: IR Lines: 16 In article <768@studsys.mu.edu> jetzer@studsys.UUCP (Mike Jetzer) writes: [ trimmed ] > In article <1990Aug19.194911.16628@fs-1.iastate.edu> spam@iastate.edu (Begley Michael L) writes: > >How do I remove the end of line marker from a stream? > tr \\012 " " < file > If you want more than one space (as your example seems to show), you > can run the output of tr through sed or awk or whatever. This is a bad idea, as spaces in the original would also be expanded. Do the sed/awk bit first. I'm about to start coding str, a ``string translator,'' to do everything tr can do but with more than one character as a unit. It's not as if other tools don't do the job; but somehow the syntax never seems right. ---Dan