sed -i '/参考行/i\插入内容' *.ksh sed -i 's,原内容,替换后内容,g' *.ksh 转载于:https://www.cnblogs.com/kakaisgood/p/8328905.html