Article View: comp.editors
Article #3524Re: SED Question
From: HansM
Date: Tue, 11 Apr 1989 17:37
Date: Tue, 11 Apr 1989 17:37
32 lines
1289 bytes
1289 bytes
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\</d as far as I can tell, because
>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</d
}
}
Hope this is what you are looking for.
--
Hans Mulder mcvax!uva!hm hm%uva@hp4nl.nluug.nl
Technical Details
Message-ID:
<690@uva.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wasatch!cs.utexas.edu!uunet!mcvax!hp4nl!uva!mel!hmReferences:
<2360001@hpcuhc.HP.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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