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
Post a Comment