Is there a way to match such pattern with shell or sed?
sed, shell
Solution
$ awk -F'\n' -v RS='' -v ORS='\n\n' 'NF>3' input.txt
BP 0 test:
case id Name
====== ======== =================
0 82 a_case-2-0-0
BP 1 test:
case id Name
====== ======== =================
0 86 a_case-2-1-0
BP 3 test:
case id Name
====== ======== =================
0 93 a_case-2-3-0
Problem
I have a file with following output: ``` BP 0 test: case id Name ====== ======== ================= 0 82 a_case-2-0-0 BP 1 test: case id Name ====== ======== ================= 0 86 a_case-2-1-0 BP 2 test: case id Name ====== ======== ================= BP 3 test: case id Name ====== ======== ================= 0 93 a_case-2-3-0 ``` so, only "BP 0,1,3" have content, so what I want is, is it possible to dump 'BP 0 test','BP 1 test' and 'BP 3 test' only, just want to ingore the 'BP 2 test' because of no test case. Thanks for your help.