print 2 line above (with specific word) after a specific match pattern

前端 未结 0 869
北海茫月
北海茫月 2020-12-22 08:47

I am newbie in python. I have a file with list of pattern and a large file with these patterns. I want to extract lines with these patterns and two lines above these match,

相关标签:
回答
  • 消灭零回复
提交回复
热议问题