What is the difference between `sponge` and redirecting with `>` (or `>>`)? Is it about better compatibility with pipes or something?
My guess is sponge buffers all the input and then sends it to output once stdin is closed.
> Unlike a shell redirect, sponge soaks up all its input before opening the output file. This allows constricting pipelines that read from and write to the same file.
Some commands (eg. sed) have an in-place option, but many don’t.