I'm trying to take the contents of a file and insert it after a pattern using sed. My question is very similar to this question, but I wish to insert the contents of a file inline rather than on a new line. How can I do this?
Using the example question I referenced, the first answer does exactly what I want; however, I want the insertion to happen inline:
sed '/First/r file1.txt' infile.txt
Aucun commentaire:
Enregistrer un commentaire