原文内容: [root@10 tmp]# more test.log 2019-12-01 09:09:02 Failed 2019-12-01 09:12:02 Failed 2019-12-01 09:15:03 Failed 2019-12-01 09:18:02 Failed
正则匹配Failed,删除整行(直接替换文本内容) [root@107 tmp] sed -i '/Failed$/'d check.log