Take the tour ×  I have a text file (devel.xml).  I added the
word REPLACETHIS to it in order to replace this string with the
content within a different file (temp.txt).  The closest thing I
have is this:  sed -i -e "/SUBSTITUTETHIS/r temp.TXT" -e "s///"
devel.txt;  This inserts the content after the string, and then
deletes the string afterwards.  Is this the best way to do it?
share|improve this question Sounds very much like homework.....
But in general this looks like you want to replace string
REPLACETHIS with something else, which will by default remove
REPLACETHIS –  Karlson Sep 28 '12 at 12:29 Does it have to be
sed? Depending on how much text is in temp.txt, I might step up
to a perl solution. –  user17591 Sep 28 '12 at 14:24 add comment
2 Answers  up vote 1 down vote accepted  What you've done is to
remove SUBSTITUTETHIS wherever it appears in the file (but not
the rest of the line where it appears) and insert the content of
temp.TXT below that line. If SUBSTITUTETHIS appears multiple
times on a l