I am trying to replace a line in a file with multiple lines. When I had only one new line char ( \'$'\n ). it worked fine, however when I use two of them, it escapes my sed and the file wont run anymore.
sed 's/TextImLookingFor/My\'$'\nReplacement\'$'\nText/g' /path/to/File.txt
This is a file TextImLookingFor look at all this text
This is a file My Replacement Text look at all this text
unexpected EOF while looking for matching '''' syntax error: unexpected end of file