From: David Neary (dneary at domain wanadoo.fr)
Date: Thu 11 Jul 2002 - 16:09:37 IST
Stephen_Reilly at domain dell.com wrote:
> sed "/^\/XXX\/ CE/,/$/d" filename
>
> To explain; the first pattern "/^\/XXX\/ CE/" matches what the pattern
> should begin with. The second pattern "/$/" matches the first subsequent end
> of line i.e. matches the end of the following line. The sed command "d"
> deletes the matched two line pattern.
But if there's more than one line of stuff after /XXX/ CE then
you're screwed. He specifically asked how to delete a line
matching a regex and the one following it.
Dave.
--
David Neary,
Marseille, France
E-Mail: bolsh at domain gimp.org
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:17:50 GMT