On Thu, 20 Mar 2008 10:55:05 -0500, problems wrote:
> It seems to me that sed & awk are single line based ?
>
> I want to delete blocks of text which look like: <opening pattern>
> <2 to 5 lines>
> <closing pattern>
>
> If I use the <2 to 5 lines>, I can avoid deleting all the good stuff, up
> to the 'next' <closing pattern> in case the assumed <closing pattern> is
> missing/undetected.
>
> Thanks for any feedback,
>
Pseudocode:
if line matches opening pattern, set flag
if flag is clear, print line
if line matches closing pattern, clear flag
If you want to keep the two pattern lines, interchange the locations of
the two tests.
--
T.E.D. (tdavis@[EMAIL PROTECTED]
)


|