I have two text files, I want to put text in the middle of another, I did some research and found information on adding individual lines:
I have a comment in the second text file STUFFGOESHERE, so I tried:
sed '/^STUFFGOESHERE/a file1.txt' file2.txt
sed: 1: "/ ^ STUFFGOESHERE / a long.txt": a command expects \ followed by text
So, I tried something else, trying to place the contents of the text based on a given string, but no luck.
Any ideas?
source
share