hi experts,
i'm trying to do this:
file1 is a template. might have kinds of 'funny' characters.
sample:
<body>
<form>
<p><input type="text" name="abc"/></p>
�
<p><my_content></p>
</form>
</body>
file2 is a file that contains lots of text. this might be very big. might have 'funny' characters as well.
sample:
<tr><td align="center">1.1</td><td>1.2</td></tr>
... many many lines ...
<tr><td align="center">2000.1</td><td>2000.2</td></tr>
my question is, how do i read file1, replace <my_content> with the content of file2, and store/print out the result?
i've tried to use sed, i firstly escape the content of file2, these characters: \ &
then i use sed substitute. but when file2 gets very big, sed would display error that the parameter is too long.
any suggestions on how to do this? i do not need the regex feature. just search that <my_content> and replace it with the content from file2.
thanks for the help.