How can I print lines muitil patterns which meet a condition?
For instance for an input file
partially containing the following:
ID : 1
Status : Ok
Name : Lulu
Age : 18
State : US
ID : 2
Status : Ok
Name : Master Yi
Age : 22
State : UK
ID : 3
Status : Ok
Name : Garen
Age : 20
State : CA
------------
Codition : IF Age == 20 | print
----------
ID : 3
Status : Ok
Name : Garen
Age : 20
State : CA
please help
Thanks
awk?grep -C4 'Name : Master Yi' filename:? Ware there really horizontal lines in the file? We need to know the exact format of the file to be able to help you.Codition : IF Age == 20 | printpart of your input file? What is your desired output?