what is the difference between pipe(|) and tee command..

Answer Posted / mohit chandila

A Pipe would allow you to direct output of one command to
the input of another command ie. directs a stream from one
file to another.

A Tee command does the same job of directing streams
however it directs the stream to two destinations direction
one is the direction where the stream would otherwise end
up if there was no Tee command And the other direction is
the file that is argument to Tee command.

So, A Tee is used in Pipes to direct streams to an outside
file without interrupting the regular propagation of stream
in the pipe.
eg.

Pipe
----------------------------------------
Output of A Input of B
----------------------------------------


Pipe
----------------------------------------
Output of A ======== Input of B
----------------||----------------------
||
||
Input of C


Is This Answer Correct ?    9 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does grep v grep do?

751


What is grep and how do you use it?

765


What are the commands in UNIX to list the files in a Directory?

795


What are file commands?

844


what is the advaantage of each user having its own copy of the shell?

2274






How does shebang work?

776


Why is it called a shebang?

781


What is updatedb?

756


What is the use of tee command?

748


How do I open a port?

763


What does sed command do in unix?

768


Write a command that will display files in the current directory, in a colored, long format.

898


What is the use of the tee command?

800


How do I clear my terminal history?

786


What is awk command used for?

773