Sed -i
-i is a "non-standard FreeBSD extension"
I have never understood the use for it. To save typing?
If we deny sed permission to write to any other file will it still work?
Could it be that there is an ephemeral temp file created? ed makes them, vi makes them. Is sed different?
What if the filesystem is a ramdisk? Does -i make any practical difference then? I always use a ramdisk as my filesystem.
I always found it easier to just avoid -i
This way I get portability.
The above applies only to BSD sed.
Not sure if GNU sed ever lacked the -i extension. 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.