I want to delete from many files each instance of a paragraph. I call paragraph a sequence of lines.
For example:
my first line my second line my third line the fourth 5th and last
the problem is that I only want to delete them when they appear as a group. For example, if
my first line
appears alone I don’t want to delete it.
If you are able to use Perl, you can do it in one line like this:
the explanation is in perlrun:
Sample input:
Output: