Hello All,
I have one file with multiple lines records like as below.. I need to extract only BFG and corresponding BSG record/line. for evry BFG there is one BSG record is there as mentioned in BOLD [line 1 and line 6] and [line 7 and line 12] so on...
BFG BR 00001 20140724 000 000 ? ?
BLG UVR QPR 01 380 ? ? 999 0 0 0 ?
BLC F 008 999 ? 0
BLC J 064 999 ? 0
BLC Y 415 999 ? 0
BSG ABCD PQR 0 0 00664 1 1 0 0 1 1 1 0 1 0
BFG BR 00001 20140726 002 000 ? ?
BLG PQV ZRP 01 380 ? ? 999 0 0 0 ?
BLC F 008 999 ? 0
BLC J 064 999 ? 0
BLC Y 415 999 ? 0
BSG LHR KUL 0 0 00664 1 1 0 0 1 1 1 0 1 0
BSB F ? 000 1 000 0004 0999 0000 000 1 0000 0000 0000 ? 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
BSB A ? 000 1 000 0004 0999 0000 000 1 0002 0000 0000 ? 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
BSB P ? 000 1 000 0000 0999 0000 000 1 0000 0000 0000 ? 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
In short i need to extaract only BFG and correponding BSG records from the file by SED ,awk ir any other utility