1
我們正在嘗試使用運行腳本更新文件。我們使用命令如何使用iOS中的運行腳本在文件中的某個字符串之後插入文本
sed -i '/use_frameworks/a HelloPod1' ../Podfile
和構建應用程序,然後我們得到了錯誤的鏈接此
的sed:1: 「../Podfile」:無效的命令代碼。 命令/ bin/sh失敗,退出代碼1
如果我們嘗試從終端運行命令,它的工作正常。
sed
命令將不會在Xcode
運行腳本?我們如何在文件中插入新行?
嘗試'sed -i.bak'/ use_frameworks/a HelloPod1'../ Podfile' ...'iOs'的'sed'需要'-i'後的參數... – anishsane