Hi,
I have a many xls file under a given directory and each file contains a line "href=a.xls"( which is different for diff files) as one of the line.
file:
----
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="
XSLT Namespace" version="1.0">
<xsl:include href="a.xls"/>.
Now I need to do the following
*. search the pattern, "<xsl:include href="
*. Obtain the file name , which happens to be "a.xls"
*. Edit "a.xls" to "a_tmp.xls"
*. write back the modified file to the original file.
I tried
sed -e 's/<xsl:include href= \([^]*\).*/include href=\1_tmp.xls;\n&/' fileOne.xsl
but it throws error "cannot parse".
Any pointer will be of great help.
Cheers