channelzero at web.de
Tue Feb 5 04:09:11 PST 2008
On Wednesday 30 January 2008 21:51:56 Olaf Grüttner wrote:
> Hi everyone,
> I have a question about working with sed.
> I have an xml file containing
> I want to change this to
> I have problems with the "<" and ">" signs. Is there a was to mask them
> in the sed command?
> sed s/"<theme>1</theme>"/"<theme>2</theme>"/g' test.xml
> does not work
Special characters can be escaped with backslash,
sed -i s/\>2\</\>1\</ test.xml
sed -i s/\<theme\>2\<\\/theme\>/\<theme\>1\<\\/theme\>/ test.xml
More information about the blfs-support