Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!crdgw1!ge-dab!sundance7!brooks From: brooks@sundance7.dab.ge.com (Stephen Brooks) Newsgroups: comp.unix.questions Subject: novice sed ? Message-ID: <1991May3.213550.17246@ge-dab.GE.COM> Date: 3 May 91 21:35:50 GMT Sender: news@ge-dab.GE.COM (USENET News System) Organization: General Electric SCSD, Daytona Beach FL Lines: 36 Nntp-Posting-Host: sundance7.dab.ge.com I have a sed question for you gurus: assume I have a file of the form name1; A1.1 B10.20 C100.300, D101.25 E202.50, F300.7 name2; Z44.33 Y409.45 name3; X777.77 W6.6, V32.15 where a comma (,) represents a continuation character. I need to "massage" this into something which looks like this: name1; A1.1 B10.20 C100.300 D101.25 E202.50 F300.7 name2; Z44.33 Y409.45 name3; X777.77 W6.6 V32.15 Can I do this in sed? I've tried using the N command in sed, but the problem with it is I don't see how to handle multiple continuation lines without using multiple N commands. Is this possible? What am I missing? I currently have to do something like this (in sed): /,$/ N find "," at end of line, append next line to input pattern s/\n// delete embedded /,$/ N do it again (and again and again...) s/\n// . . . Thanks! -- %% Stephen (Steve) M. Brooks %% brooks@ge-dab.ge.com %% %% GE Simulation & Control Systems %% ...!uunet!ge-dab.ge.com!brooks %% %% P.O. Box 2825, Rm. 1370 %% ...!uunet!sunny.dab.ge.com!brooks %% %% Daytona Beach, FL 32115-2825 %% voice: (904) 239-4855 %%