Re^2: SED Question

3929] uucibg at sw1e.UUCP
Sat Apr 15 13:40:40 AEST 1989


In article <1003 at philmds.UUCP> leo at 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>



More information about the Comp.unix.questions mailing list