sponge

A kind of Unix filter that reads its entire input before writing any output, e.g. sort. Unlike most filters, a sponge can safely overwrite the input file with the output data.

On a file system with file versioning (like ITS or VMS) the distinction is less significant because output would be written to a new version of the input file anyway.

See also slurp.

[Jargon File]