How can find a specific number in a text block and print the complete text block beginning with the key word \"BEGIN\" and ending with \"
\"BEGIN\"
\"
This awk should work:
awk -v s='B: 567' '$0~s' RS= file BEGIN A: xyz B: 56789 C: abc END BEGIN A: ghi B: 56712 C: pqr END