I have a text file like this:
OBJ O1 = {
{P11},
{0}
};
OBJ O2 = {
{P21},
{P22},
{P23},
{0}
};
OBJ O3 = {
{P31},
{P32},
{0}
};
I want to print only lines starting by OBJ O2
and ending by first {0}
after OBJ O2
OBJ O2 = {
{P21},
{P22},
{P23},
{0}
};
Is there a solution to print these lines using cat, sed, awk or grep?