title: Sed match N times
body: <p>I wanna remove a specific argument from a command like the one below,</p>
  
  <pre><code>mycommand --address=127.0.0.1 --file=/usr/local/somefile --port=8090 --key-file=/usr/local/server.key 
  </code></pre>
  
  <p>In this case, I wanna remove <code>--file=/usr/local/somefile</code>, how can I match the text from <code>--file=</code> to the next <code>--</code> or to the N times occurrences of <code>--</code> using <code>sed</code>.</p>