相关疑难解决方法(0)

使用shell脚本合并两个属性文件

如何使用shell脚本合并两个属性文件,例如: - 如果我有两个属性文件,如:

first.properties
/test/file="anish"
/test/version=3.0

second.properties
/test/author=nath
/test/version=2.0
Run Code Online (Sandbox Code Playgroud)

如果我将first.properties合并到second.properties上,那么常见的现有属性应该取自first.properties,所以我的输出应该看起来像

final.properties
/test/file="anish"
/test/version=3.0
/test/author=nath
Run Code Online (Sandbox Code Playgroud)

unix bash shell

8
推荐指数
1
解决办法
3693
查看次数

标签 统计

bash ×1

shell ×1

unix ×1