I have to modify a document containing xml data; one modification I couldn't set up with sed
.
I have to modify the following expressions from:
<Bild href_fmt="Bilder/Bildschirmfoto%202012-06_fmt.jpeg"
href="file:///user/folder/Desktop/Bildschirmfoto%202012-06-18%20um%2013.17.45.png"></Bild>
to:
<a href="http://test.server.at/media/somefolder/Bildschirmfoto%202012-06_fmt.jpeg"
target="_blank"><img src="http://test.server.at/media/somefolder/Bildschirmfoto%202012-06_fmt.jpeg"
alt="" width="350" height="" /></a>
My problem: I couldn't duplicate the Bildschirmfoto%202012-06_fmt.jpeg
to generate the correct new entry. The HTML tag is somewhere in the line, therefore I can't duplicate the whole line...
How can I do this with sed
or other Linux commands?