I\'m trying to insert a file content before a given pattern
Here is my code:
sed -i \"\" \"/pattern/ { i\\\\ r $scriptPath/adapters/default/permissi
Just remove i\\.
i\\
Example:
$ cat 1.txt abc pattern def $ echo hello > 2.txt $ sed -i '/pattern/r 2.txt' 1.txt $ cat 1.txt abc pattern hello def