I was using the
Less command to examine a very large text log file (15 GB) and was trying to look for a multiline pattern but after an investigation,
Less The command can only search for single-line patterns.
Is there a way to use
grep command to return the number line of a multiline pattern?
The format of the record is something like this in iterations of hundreds of thousands:
Package A op_3b: 001 ctrl_2b: 01 account_i: 5 Package f op_3b: 101 ctrl_2b: 00 account_i: 4 Package x op_3b: 010 ctrl_2b: 11 account_i: 98 CA Package op_3b: 100 ctrl_2b: 01 account_i: 5 LP Package op_3b: 001 ctrl_2b: 00 ini_count: 0 ZZ package op_3b: 111 ctrl_2b: 01 ini_count: 545 QEA package op_3b: 111 ctrl_2b: 11 ini_count: 0
And what I'm trying to achieve is to have
grep or some other command to return the start of the line number when these three line patterns occur:
op_3b: 001 ctrl_2b: 00 ini_count: 0