I have a large file with more than 5000 lines in the following format
Below snippet shows two blocks of the file.
string name : abcd
used :metric
test :ok
{
fun: add
fun: sub
fun: mul
fun: div
}
string name : degh
used: non -metric
test: good
{
fun: per
fun: div
fun: add
fun: mul
}
What I need is to search for the string name
(eg: abcd
) , and then print the values after fun :
from that string name
's block
I would like the following output:
abcd add
abcd sub
abcd mul
abcd div
degh per
degh div
degh add
degh mul
What would be the proper way to solve this problem?