Insert in place with regex:
sed -e -i '/pattern/r file.txt' input.txt
-
-
https://stackoverflow.com/questions/22497246/insert-multiple-lines-into-a-file-after-specified-pattern-using-shell-script1h;1!H;${;g;s/<h2.*</h2>/No title here/g;p;}
-
-
http://austinmatzko.com/2008/04/26/sed-multi-line-search-and-replace/