cat file.txt
[ERROR] : yes
[Server] : abc
[Status] : completed;
[ERROR] : yes
[Server] : abc
[Status] : completed;
[ERROR] : yes
[Server] : abc
[Status] : completed;
[ERROR] : no
[Server] : fgh
[Status] : completed;
[ERROR] : yes
[Server] : def
[Status] : completed;
[ERROR] : yes
[Server] : abc
[Status] : completed;
预期输出:Wherver我们在错误行中有,我们必须添加 从第二行开始的那个服务器的值,然后计算那些值 错误行包含yes。
abc 4
def 1