Edit a property value in a property file from shell script
The title says all. i need to replace a property value whom i don't know to a different value.
i'm trying this:

    #!/bin/bash
    sed -i "s/myprop=[^ ]*/myprop=$newvalue/g" file.properties

i get `sed: -e expression #1, char 19: unknown option to `s'`

I think the problem is that `$newvalue` is a string that represents a directory so it messes up sed.

What can I do ?

Edit a property value in a property file from shell script
===

The title says all. i need to replace a property value whom i don't know to a different value.
i'm trying this:

    #!/bin/bash
    sed -i "s/myprop=[^ ]*/myprop=$newvalue/g" file.properties

i get `sed: -e expression #1, char 19: unknown option to `s'`

I think the problem is that `$newvalue` is a string that represents a directory so it messes up sed.

What can I do ?
