The Linux “tee” command is extremely useful in the right situation. This article gives some good examples: