Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bionet!agate!ucbvax!tut.cis.ohio-state.edu!rutgers!bellcore!texbell!sw1e!uucibg From: uucibg@sw1e.UUCP (3929]) Newsgroups: comp.editors Subject: Re: SED Question Message-ID: <1481@sw1e.UUCP> Date: 11 Apr 89 16:29:02 GMT References: <2360001@hpcuhc.HP.COM> Reply-To: uucibg@sw1e.UUCP (Brian Gilstrap [5-3929]) Organization: Southwestern Bell Telephone Co Lines: 29 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 cat "file to filter" | sed -e "/^PROMPT>/,/^" and one which starts with the text "<". Note that you can do sed -e "/^PROMPT>$/,/^<$/d" if you need the lines to contain exactly that text. Brian R. Gilstrap Southwestern Bell Telephone One Bell Center Rm 17-G-4 ...!ames!killer!texbell!sw1e!uucibg St. Louis, MO 63101 ...!bellcore!texbell!sw1e!uucibg (314) 235-3929 #include