【发布时间】:2011-04-04 07:59:06
【问题描述】:
在 Linux 上 sed -i 将修改输入文件。但它不适用于 Solaris。
sed -i '$ s/OLD/NEW/g' test
sed: illegal option -- i
在 Solaris 上我可以用什么代替 sed -i?
【问题讨论】:
-
在 Linux 上
sed -i将修改输入文件。 不是 - GNUsed -icreates a new temp file and then renames it to the original file name, deleting the original file in the process.