title: How to merge ini file with overrides file
body: <p>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.</p>
  
  <p>so for example, we have the file <code>default.ini</code> that holds the default values:</p>
  
  <pre><code>[foo]
  bar=1
  baz=2
  </code></pre>
  
  <p>Then we have a seperate file <code>overrides.ini</code>, which holds the "overrides":</p>
  
  <pre><code>bar=10
  </code></pre>
  
  <p>What I want to end up with is:</p>
  
  <pre><code>[foo]
  bar=10
  baz=2
  </code></pre>
  
  <p><code>patch</code> immediately sprang to mind, but I can't get that to work unless <code>overrides.ini</code> has ALL values in <code>default.ini</code> with <code>bar</code> changed (in which case I might as well just use <code>overrides.ini</code>)</p>
  
  <p><code>join</code> Seemed an option until I saw the requirement that the input files need to be sorted, which is not a possibility in my situation.</p>