Linux tee

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

Linux tee

The 'tee' command is similar to 'cat' command with only one difference. It puts stdin on stdout and also put them into a file.

Syntax:

  1. cat or tac <fileName> | tee <newFile> |  cat or tac |.....  

Example:

tac weeks.txt | tee new.txt | cat 

Linux tee Filters

Look at the above screenshot, file 'new.txt' is created with the help of'tee'command.