tee

In computing, tee is a command which reads standard input and writes it to both standard output and one or more files, effectively duplicating its input.

It is primarily used in conjunction with pipes. The command is named after the T-splitter used in plumbing.

Example:

date | tee currentdate.txt | cut -d" " -f1
The file currentdate.txt will be created in current directory which will contain the output of command date. The output will be the parse of cut command