I have two files, A
and B
.
File A
is a letter, as below, which contains several placeholder strings on each line, like <@userid>
.
<@U39RFF91U> for all the help in this project!
Thanks for your help to enhance the data quality <@U2UNRTLBV> <@U39RFF91U> <@U2UQCN023>!
Thanks for <@U38F4TBQ9> <@U38F5PQ73> <@U38F747CZ> <@U39RT0G07> and <@U2UQ17U20> ’s great work at the New Product!
Successful release! <@U2WHAAU9H> <@U2ML3C551> <@U38F4TBQ9> <@U38F747CZ> <@U39RT0G07> <@U2UQ17U20> <@U38F5PQ73> <@U2N64H7C6>!
Praise <@U2X0APW3Y> for going above and beyond to help with the retail campaign!
File B
is a mapping table, mapping all user IDs to each user's name:
U39RFF91U Person1
U2UNRTLBV Person2
I'd like to work out a final file, C
, with the content from the letter in A
, but with all placeholders replaced by the corresponding content from the mapping table in file B
.
Any idea how to do it via shell script on Linux?
Thanks for your help to enhance the data quality Karup Upkar <@U2UQCN023>! Thanks for <@U38F4TBQ9> <@U38F5PQ73> <@U38F747CZ> <@U39RT0G07> and <@U2UQ17U20> .s great work at the New Product!
Successful release! <@U2WHAAU9H> <@U2ML3C551> <@U38F4TBQ9> <@U38F747CZ> <@U39RT0G07> <@U2UQ17U20> <@U38F5PQ73> <@U2N64H7C6>!
Praise <@U2X0APW3Y> for going above and beyond to help with the retail campaign!
– upkar Jan 26 '17 at 12:13