Article View: comp.editors
Article #3545Re: Re^2: SED Question
From: 3929]
Date: Sat, 15 Apr 1989 03:40
Date: Sat, 15 Apr 1989 03:40
46 lines
1459 bytes
1459 bytes
In article <1003@philmds.UUCP> leo@philmds.UUCP (Leo de Wit) writes:
=I think you'll need a third attempt 8-). It still doesn't handle correct
=a series of lines like
=
= PROMPT>
= PROMPT>
= >
= <
=
=or one like
=
= PROMPT>
= >
= PROMPT>
= >
= <
=
=Alternative:
=
=sed -n '
=: start
=$p
=$q
=N
=/^PROMPT>\n>\n<$/d
=/\n[^\n]*\n/{
= P
= D
=}
=b start'
=
= Leo.
I think I may have missed a posting or two on this topic. Could someone
please tell me why the following does not handle the problem:
cat myfile | sed -e '/^PROMPT>$/,/^<$/d'
Many thanks,
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 <std_disclaimers.h>
Technical Details
Message-ID:
<1496@sw1e.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pasteur!ucbvax!decwrl!labrea!rutgers!bellcore!texbell!sw1e!uucibgReferences:
<2360001@hpcuhc.HP.COM> <38564@bbn.COM> <2292@solo11.cs.vu.nl> <1003@philmds.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pasteur!ucbvax!decwrl!labrea!rutgers!bellcore!texbell!sw1e!uucibg From: uucibg@sw1e.UUCP (3929]) Newsgroups: comp.editors,comp.unix.questions Subject: Re: Re^2: SED Question Keywords: sed, improvement, fix Message-ID: <1496@sw1e.UUCP> Date: 15 Apr 89 03:40:40 GMT References: <2360001@hpcuhc.HP.COM> <38564@bbn.COM> <2292@solo11.cs.vu.nl> <1003@philmds.UUCP> Reply-To: uucibg@sw1e.UUCP (Brian Gilstrap [5-3929]) Organization: Southwestern Bell Telephone Co Lines: 46