News for hackers. Stuff that matters.
Re:Instant replay: Debugging C and C++ programs with rr by 1vuio0pswjnm7 on Tuesday May 04, 2021 @07:03AM (#27036199)
I prefer ed for so-called "in-place" editing, not "sed -i". I am always using tmpfs anyway and it makes little difference to me if I can see the temporary file created or whether it is effectively hidden. Even NetBSD has added "-i" to sed now, and coreutils does not include ed. I do not see such moves as "progress" but that's just me.

If MacOS sed has "-a" then something like

   sed -na 's/a/b/;H;$!d;g;w'file file
should approximate "-i" (but without a temp file). The catch is it will leave a blank line at the top.

There are no comments on this comment yet.