Hello
I have 60+ *.xhtml files
I have to find particular phrase (e.g. <h3 id="top">) which includes spaces, <, ", etc.
and replace it with another phrase
(e.g. <a class"top" href="../file/file.xhtml>), also with spaces and other 'characters'.
I tried to use sed:
and have error:
or
with this error
or
with error
What shall I do?
Any proper way of entering this command?
Any help?
Or how to do that?
greetings
I have 60+ *.xhtml files
I have to find particular phrase (e.g. <h3 id="top">) which includes spaces, <, ", etc.
and replace it with another phrase
(e.g. <a class"top" href="../file/file.xhtml>), also with spaces and other 'characters'.
I tried to use sed:
Code:
find . -name "*.xhtml" | xargs sed -i 's/<h3 id="top">/<h3 id="top"><a class="tyt" href="http://forums.opensuse.org/english/get-technical-help-here/Text/text.xhtml">/g'
Code:
sed: -e expression #1, char 54: unknown option to `s'
Code:
find . -name "*.xhtml" | xargs sed -i 's/'<h3 id="top">'/'<h3 id="top"><a class="tyt" href="http://forums.opensuse.org/english/get-technical-help-here/Text/SpisTresci.xhtml">'/g'
Code:
syntax error near unexpected token `<'
Code:
find . -name "*.xhtml" | xargs sed -i 's/"<h3 id="top">"/"<h3 id="top"><a class="tyt" href="http://forums.opensuse.org/english/get-technical-help-here/Text/SpisTresci.xhtml">"/g'
Code:
sed: -e expression #1, char 57: unknown option to `s'
Any proper way of entering this command?
Any help?
Or how to do that?
greetings