Sed has a built-in command to read files. The commands you want look something like this:
$ sed -e '/INSERT_HERE1/ { r FILE1 d }' -e '/INSERT_HERE2/ { r FILE2 d }' < file
This will lead to the conclusion
foo this is file1 bar this is file2 baz
The r command reads the file, and the d command deletes the line with the INSERT_HERE tags. You need to use curly braces, as sed commands and multi-line input, as sed commands must run on their own line, and depending on your shell, you may need \ at the end of lines to avoid premature execution. If this is something that you would use a lot, you can just put the command in a file and use sed -f to run it.
source share