title: How to add a line in sed if not match is found
body: <p>I am using the following <code>sed</code> command to replace some parameters in a config file:</p>
  
  <pre><code>sed -i 's/^option.*/option=value/g' /etc/fdm_monitor.conf
  </code></pre>
  
  <p>Now I have one problem. If the line does not exist, I want to add it to the bottom of the file.</p>
  
  <p>I am calling this with a <code>popen</code> out of a C program. I tried using <code>awk</code>.</p>