unix - Replace a value of a parameter in a file from Bash Script -


i have pair in configuration file:

theparameter="thevalue" 

i trying replace thevalue bash script like, no luck.

sed 's/theparameter="(.*)"/theparameter="newvalue"/' /etc/my.conf  

can suggest correct way?

see example:

kent$  echo 'theparameter="thevalue"'|sed 's/\(theparameter="\).*/\1newvalue"/' theparameter="newvalue" 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -