I'm trying to write a small shell script/command to insert the contents of one file into another file at a position marked with a given text string. It's not necessarily at the top or bottom of the file so I can't just use cat to cat the files together.
I think probably sed with the r option is what I want to use but not sure. Any ideas would be appreciated.
Fantastic!! That's almost exactly what I want. Can I get rid of SEARCHSTRING at the same time or is that a case of piping the output of this command to another sed to do something like sed '/SEARCHSTRING//' ?