replace

"Rachid Mokrani [email protected] [sed-users]" <[email protected]> Wed, 22 Feb 2017 22:37:57 +0100
Newsgroups gmane.editors.sed.user
Message-ID <CAAG1AQcjbzfCGwOXES7LD3gXd_ei4y0WK10sFENyJSZmt9v8Yg@mail.gmail.com>
Hi,


A little help would be appreciated to get the result below.
Read input from A.txt compare with B.txt and replace/add lines to C.txt




file A.txt :


paul-112001
paul-151998
helen-101995
mike-252001
mike-171998
mike-131999
mike-151989


file B.txt :


paris/paul
boston/paul
london/paul
san-francisco/mike
san-francisco/helen
san-francisco/dan
rome/james




Need result in file C.txt:


paris/paul-112001
paris/paul-151998
boston/paul-112001
boston/paul-151998
london/paul-112001
london/paul-151998
san-francisco/mike-252001
san-francisco/mike-171998
san-francisco/mike-131999
san-francisco/mike-151989
san-francisco/helen-101995
san-francisco/dan
rome/james




Many thanks.




[Non-text portions of this message have been removed]