Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • You talk about multi patterns, but only look for one pattern. Please elaborate by editing your question. Also, does it have to be awk? Commented Jun 16, 2020 at 9:15
  • 1
    If this file has the fixed set of lines.. than you can do something like grep -C4 'Name : Master Yi' filename Commented Jun 16, 2020 at 9:23
  • 1
    Please edit your question to include answers to comments. Most importantly, please use the formatting tools to format your example file as code. Does it really have so many blank lines? Are there really spaces around the :? Ware there really horizontal lines in the file? We need to know the exact format of the file to be able to help you. Commented Jun 16, 2020 at 9:52
  • 1
    Is Codition : IF Age == 20 | print part of your input file? What is your desired output? Commented Jun 16, 2020 at 10:08
  • 1
    Please edit your question to include the desired output for the example input you provided. Also, include what you have already tried and where you ran into difficultier. Commented Jun 16, 2020 at 11:33