TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Sed -i

2 pointsby 10165almost 8 years ago
-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

viraptoralmost 8 years ago
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.