I'm trying to use Awk to get the id and name fields ($1 and $2) of file1 combined with their corresponding multiline records in file2 that are separated by blank line. Both files are ordered so that the first line of file1 corresponds to the first set of multiline records in file2 and so on.
file1.txt
23315:MR FANOVER:BR:H:1994
45322:MR DEWEY:B:F:1996
23316:MR DREAMMAKER:BLK:X:1996
45323:MR MAN:BR:L:1997
file2.txt
99-01-14:BML:10:FT
99-01-31:BML:37:GD
99-06-18:MAY:73:FT
99-06-30:BML:71:SL
99-01-15:WDB:17:FT
99-01-25:MOHO:28:GD
99-07-2:BR:75:SY
99-12-6:NFLDO:32:SL
99-12-13:NFLD:39:FT
99-12-19:NFLD:40:FT
Desired Output:
23315:MR FANOVER:99-01-14:BML:10:FT
23315:MR FANOVER:99-01-31:BML:37:GD
23315:MR FANOVER:99-06-18:MAY:73:FT
23315:MR FANOVER:99-06-30:BML:71:SL
45322:MR DEWEY:99-01-15:WDB:17:FT
45322:MR DEWEY:99-01-25:MOHO:28:GD
23316:MR DREAMMAKER:99-07-2:BR:75:SY
45323:MR MAN:99-12-6:NFLDO:32:SL
45323:MR MAN:99-12-13:NFLDO:39:FT
45323:MR MAN:99-12-19:NFLDO:40:FT
Can anybody offer a solution?