News for hackers. Stuff that matters.
Re:Moreutils – Unix tools that nobody thought to write (2012) by tarruda on Saturday August 22, 2020 @06:52AM (#24243252)
That doesn't seem like an efficient way to do it.

Commands that process file in place (sed -i) write to a temporary file in the same filesystem and then rename to the target file, which works if you want to process files that don't fit into memory.

Re:Moreutils – Unix tools that nobody thought to write (2012) by jpab on Saturday August 22, 2020 @07:54AM (#24243524)
I apologise, I was speaking loosely. I don't know if sponge collects input in memory or in a file. (Frankly I've never needed to care since the files I've ever needed this tool for have all been small)
Re:Moreutils – Unix tools that nobody thought to write (2012) by mslm on Saturday August 22, 2020 @07:20AM (#24243372)
Without inspecting the implementation of `sponge` that's how I assumed it already internally worked.