有没有办法将这种模式与shell或sed相匹配?

我有一个包含以下输出文件
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

相关文章

用的openwrt路由器,家里宽带申请了动态公网ip,为了方便把2...
#!/bin/bashcommand1&command2&wait从Shell脚本并行...
1.先查出MAMP下面集成的PHP版本cd/Applications/MAMP/bin/ph...
1、先输入locale-a,查看一下现在已安装的语言2、若不存在如...
BashPerlTclsyntaxdiff1.进制数表示Languagebinaryoctalhexa...
正常安装了k8s后,使用kubect工具后接的命令不能直接tab补全...