sed insert line command OSX

前端 未结 7 2162
太阳男子
太阳男子 2020-12-16 14:02

I\'m trying to insert text to the third line in a file using sed, and the syntax I\'ve found on other forums is:

sed -i \'\' \"3i\\ text to insert\" file
         


        
7条回答
提交回复
热议问题