TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Sed -i

2 点作者 10165大约 8 年前
-i is a &quot;non-standard FreeBSD extension&quot;<p>I have never understood the use for it. To save typing?<p>If we deny sed permission to write to any other file will it still work?<p>Could it be that there is an ephemeral temp file created? ed makes them, vi makes them. Is sed different?<p>What if the filesystem is a ramdisk? Does -i make any practical difference then? I always use a ramdisk as my filesystem.<p>I always found it easier to just avoid -i<p>This way I get portability.<p>The above applies only to BSD sed.<p>Not sure if GNU sed ever lacked the -i extension.

1 comment

viraptor大约 8 年前
For convenience. And script clarity. If you have a move after standard sed, half of the commands in that group are for housekeeping. Sed -i makes the line more explicit.