Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!brutus.cs.uiuc.edu!apple!rutgers!bellcore!pcharming!tr From: tr@pcharming.ctt.bellcore.com (tom reingold) Newsgroups: comp.unix.wizards Subject: Re: vi and sed questions Summary: sed solution offered Message-ID: <17592@bellcore.bellcore.com> Date: 11 Sep 89 00:22:16 GMT References: <4370002@hpavla.HP.COM> Sender: news@bellcore.bellcore.com Reply-To: tr@pcharming.UUCP (tom reingold) Organization: Bellcore, Piscataway, Noo Joizy Lines: 31 On the subject of "vi and sed questions", rowland@hpavla.HP.COM (Fred Rowland) writes: $ [vi question deleted. I'll let someone else offer something.] $ $ sed question $ $ The file used in the above example is a mail list which $ has to be converted into labels. I add three @ symbols to the end $ of each line, then convert all of them to newlines. I can do this $ in vi but I get substitution overflows as the file grows considerably $ in size. I would prefer to use sed, but how do you tell sed to $ split a line (generate a newline)? I've tried various $ combinations of \(Return), \n, CTRL-V, and such but nothing $ works. I EVEN READ THE MANUAL! It told me to use \n and $ gave an example. It didn't work. This has to be possible, but $ how? One nice solution is to use tr instead. Yeah! I finally get to promote "my" program -- tr was named after me. No, just kidding. I think the command tr @ '\012' should suffice. Tom Reingold |INTERNET: tr@bellcore.com Bellcore |UUCP: bellcore!tr 444 Hoes La room 1H217 |PHONE: (201) 699-7058 [work], Piscataway, NJ 08854-4182 | (201) 287-2345 [home]