# echo This is the replacement line >/tmp/replacementFile
# cat <<EOF >/tmp/sedScript
/MARKER/ {
r /tmp/replacementFile
d
}
EOF
# cat <<EOF >/tmp/testText
This
is the
test text and
the next line should have been replaced:
MARKER
Hi, Mom! did it work?
EOF
# sed -f /tmp/sedScript </tmp/testText