Hi,
I want to write a
sed script which from
Code:
batiato:
batiato/giubbe:
pip_b.2.txt
pip_b.3.txt
pip_b.3mmm.txt
bennato:
bennato/peterpan:
123.txt
consoli:
pip_a.12.txt
daniele:
daniele/anna:
abc.txt
procuces
Code:
batiato/giubbe:
pip_b.2.txt
pip_b.3.txt
pip_b.3mmm.txt
bennato/peterpan:
123.txt
consoli:
pip_a.12.txt
daniele/anna:
abc.txt
I would imagine something like:
"if a line containing ":" is followed by an empty line delete both lines (the line with ":" and the empty line)"
i.e. something like in general
if a line containing regex1 is followed (immediately after) by a line containing regex2 delete both lines.
if it would be on one line I would do:
sed '/regex1.*regex2/d' -->
how to spread this command on 2 lines? And consider hat in my case regex2 is an empty line ( i.e. ^$).
thanks