kiss-community / repo

KISS Linux - Unofficial Repositories, mirror of https://codeberg.org/kiss-community/repo
https://kisslinux.org
MIT License
41 stars 17 forks source link

proposal: Bring sed -i back? #92

Closed git-bruh closed 2 years ago

ioraff commented 2 years ago

I'd rather ship a posix-compliant ed (i.e. one that supports regex, which busybox does not) and use that.

illiliti commented 2 years ago

It's impossible to use sed -i in portable way. Some implementations require extension argument, some don't, some don't implement this option at all.

See also: https://www.austingroupbugs.net/view.php?id=530

aabacchus commented 2 years ago

The current solution (sed file >_; mv _ file) works with every implementation, and doesn't require any new tools. There's no reason to stop using it. This is just for build scripts, it's ok to have one extra line for the sake of simplicity and portability.