Introduction
Sometimes you want to see the output of a command on the screen and save it to a file at the same time. The tee command helps by splitting the output so you don't have to run the command twice or lose the output.
When you want to save the output of a command to a file but also see it live on the screen.
When you run a script and want to keep a log while watching progress.
When debugging and you want to capture output without stopping the flow.
When you want to append output to an existing file while still viewing it.
When you want to share output with another command and save it simultaneously.