Hi All,
I am relatively new to scripting and am stuck on this problem, having tried many combinations of sed and awk.
I am generating XML files ('File 2' - 20101214_1800_111_CODE.XML) which contain XML from line 1 starting with
<REPORT>
I need to insert a header for each file from a seperate file ('File 1' - xml_header.txt) which contains the below:
<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="mdd-stylesheet.xsl" ?>
I need this to be updated into File 2 as this is a dynamically named file containing date, time and version information.
File 2 after this needs to look like this:
<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="mdd-stylesheet.xsl" ?>
<REPORT>
I would be grateful for any assistance on how I can do this.