Sounds like it would be best done by a scripting language.
Is the 2nd file to be appended near the end of the first file?
Sounds like:
1. Remove the last closing tag from the first file.
2. Add all of the second file.
3. Add the last closing tag.
If you need to add it somewhere in the middle, it'd be something like:
1. Copy the file until you reach the specified tag.
2. Call a function which adds all of the second file.
3. Copy the rest of the file.
Eg, particular unix commands might be:
sed '$s/ *\([^ ]* *\)$//' data1.file >> output.file
cat data2.file >> output.file
cata endtag.file >> output.file.
Where endtag.file just contains the endtags, and your filenames are data1.file and data2.file.
http://www.computing.net/answers/uni...file/7535.html http://cds.dl.ac.uk/cds/manuals/unix_guide/node39.html