I have two files in UNIX. 1st file is Entity and Second File is References. 1st File has only one column named Entity ID and 2nd file has two columns Entity ID | Person ID.
I want to produce a output file where entity id's are matching in both the files.
Entity File
624197
624252
624264
624276
624280
624309
624317
Reference File
624252|624346
624264|1070122
624264|624346
624276|624588
624280|624346
624280|624582
624298|624588
624319|333008
624330|624588
Output File
624252|624346
624264|1070122
624264|624346
624276|624588
624280|624346
624280|624582
Entity Files has 90K Records and Reference file has 200K Records. Is there an efficient way to produce the third file ? Any solution is appreciated.