我有一个包含以下输出的文件:
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
所以,只有“BP 0,1,3”才有内容,所以我想要的是,是否有可能只进行’BP 0测试’,’BP 1测试’和’BP 3测试’,只想进入’ BP 2测试’因为没有测试用例.
谢谢你的帮助.
$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