Insert a line at specific line number with sed or awk

后端 未结 9 1474
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-30 17:15

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

9条回答
  •  醉酒成梦
    2020-11-30 17:42

    sed -i "" -e $'4 a\\n''Project_Name=sowstest' start

    • This line works fine in macOS

提交回复
热议问题