I have a 30,000 file text file from which I need to extract data; I will start with example.
Let's say I have three network object-group in the file as A,B and C with different objects as below:
object-group network C
network-object host 10.57.31.66
network-object host 10.57.31.67
network-object host 10.80.40.201
network-object host 10.80.40.202
object-group network A
network-object 10.14.60.0 255.255.252.0
network-object 10.14.63.0 255.255.255.0
network-object 10.14.64.0 255.255.255.0
object-group network B
network-object host 10.13.5.116
network-object host 10.13.5.117
I need to extract group A and C from the file along with all other lines; i.e. line with object A and next 3 lines and then object C and next 4 lines.