Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wasatch!cs.utexas.edu!uunet!mcvax!hp4nl!uva!mel!hm From: hm@uva.UUCP (HansM) Newsgroups: comp.editors Subject: Re: SED Question Message-ID: <690@uva.UUCP> Date: 11 Apr 89 17:37:50 GMT References: <2360001@hpcuhc.HP.COM> Sender: news@uva.UUCP Reply-To: hm@uva.UUCP (Hans Mulder) Organization: Faculteit Wiskunde & Informatica, Universiteit van Amsterdam Lines: 32 In article <2360001@hpcuhc.HP.COM> smaxwell@hpcuhc.HP.COM (Susan Maxwell) writes: > >Got a sed question for you: I'm creating a sed filter to mask out and >delete unwanted characters in a trace file. I'm having trouble with this >configuration: > > LINE I: PROMPT> > LINE I+1: > > LINE I+2: < > >Whenever I see this series, I want to delete ALL THREE lines. I can't >create a pattern /PROMPT\>\\n\>\\n\sed won't allow patterns to span lines. Is there a way to do this, without >resorting to awk or ed? > >Susan Maxwell How about "sed -f sedscript", where the file named sedscript contains: /PROMPT>/ { N /PROMPT>\n>/{ N /PROMPT>\n>\n