kiss-community / repo

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

proposal: Bring sed -i back? #92

Closed git-bruh closed 1 year ago

ioraff commented 1 year ago

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

illiliti commented 1 year 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 1 year 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.