Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Using sed to delete lines between a matched pattern

$
0
0
Hi I am new to editing files with sed and have tried this solve this problem to no avail I was wondering if there was anyone out there that knew of a solution to this?
I am trying to delete all the copy and lines between a matched pattern except for the copy that matches a particular regex.
I can delete all the copy between any set of start and stop patterns but what I really want to do is save the copy that matches a regex and delete everything else.
thanks very much.

Viewing all articles
Browse latest Browse all 16232

Trending Articles