title: Modifying ini files using shell script
body: <p>I have an <code>ini</code> file similar to this</p>
  
  <pre><code>[test]
  foo=bar
  </code></pre>
  
  <p>and if we call this <code>ini</code> file as <code>test1.ini</code></p>
  
  <p>How do I change the value of <code>foo</code> to <code>foobarbaz</code> for example using <code>shell script</code>.</p>
  
  <p>I have tried the following and it doesn't work for me. I don't see the updated changes in the ini file. how do I write it?</p>
  
  <pre><code>sed "/^foo=/s/=.*/=foobarbaz/" &lt; test1.ini
  </code></pre>
  
  <p>Do you have any other suggestions</p>