Sed to strip block text in file

$ cat test.txt
abc
    <!-- BOF block -->
... a whole bunch of stuff
    <!-- EOF block -->
def
$ sed '/<!-- BOF block -->/,/<!-- EOF block -->/d' test.txt
abc
def

Leave a Reply

Your email address will not be published. Required fields are marked *