I have a script file which I need to modify with another script to insert a text at the 8th line.
String to insert: Project_Name=sowstest, into a file c
Project_Name=sowstest
sed
The -i flag works differently on macOS sed than in GNU sed.
-i
Here's the way to use it on macOS / OS X:
sed -i '' '8i\ 8 This is Line 8' FILE
See man 1 sed for more info.