I have a text file which contains more than 1000 records in Linux.
Every record starts with a keyword RECORD and it is in the below format
RECORD
Reference
InputID
OutputID
NetworkID
TransactionID
.
.
RECORD
.
.
.
.
RECORD
.
.
.
.
I want to get a RECORD which has Network ID as 10 and Transaction ID as 20 (matching both conditions).
Using the normal grep, since it is multi line text file – it doesn’t give me the correct output.
Any suggestions on how to get the desired result?
Vaibhav Lokesh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.