in reply to Re^4: Print line from file only once even if occurrence of pattern is more than once in the line
in thread Print line from file only once even if occurrence of pattern is more than once in the line

You can find many good ideas in thread How can I print three lines before pattern match?
  • Comment on Re^5: Print line from file only once even if occurrence of pattern is more than once in the line