小编Mis*_*Jay的帖子

如何使用 shell 脚本将值从一个文件映射到另一个文件并将其写入另一个文件

我有 2 个文本文件。

下面的文本文件是projectnameid.txt. 第一列是项目名称。项目 ID 中的第二列

basket-items                      9189
cloudfabric-notifications         10789
cloud-ports                       10965
common                            9081
customer-port-management          8550
deploy-quote                      8348
geographical-location-management  8549
internet-connections              9293
ipaddress                         8536
ip-addresses                      9294
order-notifications               11725
order-status                      8353
port-inventory                    8486
port-locations                    8490
pricing-quotes                    8493
product-availability              8488
product-catalogue                 8489
product-countrylist               8492
stub-service                      8510
customer-port-management-sf       10488
internet-connections-order-sf     11166
ip-addresses-order-sf             11165
Run Code Online (Sandbox Code Playgroud)

下面的文本文件是endfilter3-all-b.txt

337718  10965  "refs/merge-requests/13/head"  "2023-07-19T11:39:41.739Z"
318933  8536   "develop"                      "2023-07-05T11:41:28.482Z"
366210  8549   "develop"                      "2023-08-11T13:49:18.905Z"
338835  8510   "main"                         "2023-07-20T06:45:59.823Z"
135208  8348   "main"                         "2023-02-17T11:25:07.723Z"
115402  8493   "main"                         "2023-02-07T06:52:05.486Z"
361979 …
Run Code Online (Sandbox Code Playgroud)

linux shell awk grep sed

-1
推荐指数
1
解决办法
139
查看次数

标签 统计

awk ×1

grep ×1

linux ×1

sed ×1

shell ×1