Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!uwvax!oddjob!mimsy!chris From: chris@mimsy.UUCP Newsgroups: comp.unix.questions Subject: Re: The solution to the sed - multiple lines problem Message-ID: <5768@mimsy.UUCP> Date: Thu, 12-Mar-87 03:32:59 EST Article-I.D.: mimsy.5768 Posted: Thu Mar 12 03:32:59 1987 Date-Received: Fri, 13-Mar-87 04:41:28 EST References: <574@hao.UCAR.EDU> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 29 In article <574@hao.UCAR.EDU> bill@hao.UCAR.EDU (Bill Roberts) writes: >The following sed script does the job: >/one/!b >N >/two/!b >N >/three/!b >s/\n/, /g Alas, this script fails to convert the input one one two three four to one one, two, three four While I think it is possible to handle this case, and its counterpart `one\ntwo\none\ntwo\nthree', I am not going to work on it. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690) UUCP: seismo!mimsy!chris ARPA/CSNet: chris@mimsy.umd.edu