title: Edit a property value in a property file from shell script
body: <p>The title says all. i need to replace a property value whom i don't know to a different value.
  i'm trying this:</p>
  
  <pre><code>#!/bin/bash
  sed -i "s/myprop=[^ ]*/myprop=$newvalue/g" file.properties
  </code></pre>
  
  <p>i get <code>sed: -e expression #1, char 19: unknown option to</code>s'`</p>
  
  <p>I think the problem is that <code>$newvalue</code> is a string that represents a directory so it messes up sed.</p>
  
  <p>What can I do ?</p>