Tee (symbol)
The term "tee," represented by the symbol "T", commonly refers to a command-line utility available in most Unix-like operating systems. The primary function of tee
is to simultaneously display output to the standard output (usually the terminal) and redirect it to one or more files. This allows a user to see the output of a command while also saving it for later use or analysis.
Essentially, tee
acts as a pipe fitting, splitting the flow of data. It reads from standard input and writes to standard output and files.
Several options are typically available with the tee
command, influencing its behavior:
-a
: Appends to the given files instead of overwriting them.-i
: Ignores interrupt signals.-p
: Diagnoses errors writing to non-pipe outputs.
The tee
command is frequently used in shell scripts for logging output, debugging, and capturing intermediate results of complex pipelines. It provides a simple and effective way to monitor and preserve the output of commands without disrupting the flow of data.