小编Gle*_*n31的帖子

如何用文件中的内容替换文档中的占位符字符串

我有两个文件,AB.

文件A是一个字母,如下所示,每行包含几个占位符字符串,如<@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!
Run Code Online (Sandbox Code Playgroud)

文件B是一个映射表,将所有用户 ID 映射到每个用户名:

U39RFF91U  Person1
U2UNRTLBV  Person2
Run Code Online (Sandbox Code Playgroud)

我想计算出一个最终文件,C,其中包含字母 …

shell grep sed awk shell-script

2
推荐指数
1
解决办法
5324
查看次数

标签 统计

awk ×1

grep ×1

sed ×1

shell ×1

shell-script ×1