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 called start.
I tried to use awk and sed, but my command is getting garbled.
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 called start.
I tried to use awk and sed, but my command is getting garbled.
Thank you umläute
sed -i "" -e $'4 a\\\n''Project_Name=sowstest' filename
the following was usefull on macOS to be able to add a new line after the 4
In order to loop i created an array of folders, ti iterate on them in mac zsh
for foldercc in $foldernames;
sed -i "" -e $'4 a\\\n''Project_Name=sowstest' $foldercc/filenames;