The Linux sponge command will read ALL data from standard input then open a file for writing. This has advantages over a simple shell redirection. Learn about this interesting tool with this short tutorial.
Source: LXer – Linux Sponge – Soaking Up Input and Writing It To a File