Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uwm.edu!marque!studsys!jetzer From: jetzer@studsys.mu.edu (Mike Jetzer) Newsgroups: comp.unix.questions Subject: Re: removing end of line mark with sed Message-ID: <768@studsys.mu.edu> Date: 20 Aug 90 23:53:01 GMT References: <1990Aug19.194911.16628@fs-1.iastate.edu> Reply-To: jetzer@studsys.UUCP (Mike Jetzer) Organization: Marquette University - Milwaukee, Wisconsin Lines: 22 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? for example, >if I have a stream that esentially looks like: >1 >2 >3 >how do I make it into: >1 2 3 Try tr(1): tr \\012 " " < file Will replace all newlines (linefeeds, octal 012) with a space. Replacing linefeeds with tabs or some other character is left as an exercise. 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. -- Mike Jetzer "And we'll have fun, fun, fun until Daddy takes the keyboard awa-ay..."