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

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -