sed has to be one of the worst POSIX tools. It sounds simple enough, but everytime I reach for sed it doesn't do what I want, either because it doesn't align with how I do things, or because it just doesn't support doing it (especially multiline replacements for example).
I've switched to sd[1] because it basically just works as I expect every time.
I've switched to sd[1] because it basically just works as I expect every time.
[1]: https://github.com/chmln/sd