Skip to main content
edited tags
Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 264
added 22 characters in body
Source Link
Ryan
  • 3
  • 3

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

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 :
----------

ID : 3

Status : Ok

Name : Garen

Age : 20

State : CA

please help

Thanks

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

Code block for what I believe is the file contents.
Source Link
Kusalananda
  • 355.7k
  • 42
  • 735
  • 1.1k

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 :

ID : 3

Status : Ok

Name : Garen

Age : 20

State : CA

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 :
----------

ID : 3

Status : Ok

Name : Garen

Age : 20

State : CA

please help

Thanks

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 :

ID : 3

Status : Ok

Name : Garen

Age : 20

State : CA

please help

Thanks

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 :
----------

ID : 3

Status : Ok

Name : Garen

Age : 20

State : CA

please help

Thanks

added 3 characters in body
Source Link
Ryan
  • 3
  • 3
Loading
added 81 characters in body; added 18 characters in body
Source Link
Ryan
  • 3
  • 3
Loading
Source Link
Ryan
  • 3
  • 3
Loading