Im looking for a way, ideally in bash to merge two ini files. Here are the details. I have one file which holds the "defaults" and another which JUST specifies the lines that should be changed.
so for example, we have the file default.ini that holds the default values:
[foo]
bar=1
baz=2
Then we have a seperate file overrides.ini, which holds the "overrides":
bar=10
What I want to end up with is:
[foo]
bar=10
baz=2
patch immediately sprang to mind, but I can't get that to work unless overrides.ini has ALL values in default.ini with bar changed (in which case I might as well just use overrides.ini)
join Seemed an option until I saw the requirement that the input files need to be sorted, which is not a possibility in my situation.