I want to update
<MySettingsSettings enabled="false" logFilePath="E:\server.log" />
to
<MySettingsSettings enabled="true" logFilePath="D:\server.log" />
How can I do this through sed? or is there any other way to update in a windows server?
|
I want to update
to
How can I do this through sed? or is there any other way to update in a windows server? | |||||
feedback
|
|
My suggestion, is that you use a real programming language that can actually parse and update XML/HTML documents properly. Using sed to update XML/HTML will probably fail in the long run. | |||||
|
feedback
|
|
A simple substitution from your example can be done like this:
However, I would agree with Zoredache's warning that unless you are only doing a very simple string replacement inside XML, you'd be better off with a language that has libraries available specifically built for parsing XML. A great resource for a multitude of handy sed commands is the "sed one-liner" file: | |||
|
feedback
|