how to grep one string occuring multiple times from same file

后端 未结 3 709
北荒
北荒 2021-01-29 14:24

I want to capture a string 1 row affected... But problem is there are no of such string present in the same file.

My concern to capture 1 row affecte

3条回答
  •  花落未央
    2021-01-29 15:06

    perl -e 'while (<>) { if (/job completed successfully/) { $flag=1; } elsif (/1 row affected/) { print; } else { $flag=0; } }'
    

提交回复
热议问题