我有两个属性文件,我想用文件 B 中的任何匹配键/值条目替换文件 A 中的键/值对。文件 A 的条目将比文件 B 多 - 预计这两个文件不会具有完全相同的条目数。此外,文件 B 可能包含文件 A 中未包含的条目。
举个例子:
File A
"GB" = "United Kingdom";
"SE" = "Sweden";
"BR" = "Brazil";
"FR" = "France";
"ES" = "Spain";
"DE" = "Germany";
File B
"GB" = "Regno Unito";
"SE" = "Svezia";
"BR" = "Brasile";
"BR" = "Brasile";
"CL" = "Cile";
Desired Result
"GB" = "Regno Unito";
"SE" = "Svezia";
"BR" = "Brasile";
"FR" = "France";
"ES" = "Spain";
"DE" = "Germany";
"CL" = "Cile";
是否可以使用 bash 执行此搜索和替换?
谢谢,
肖恩