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 is command statement?

543


What is the use of finger command?

603


How do I open a port?

596


Which command can you use to find the currently running process in unix server?

590


What is s and g in sed command?

561






Which command is used to find whether the system is 32 bit or 64 bit?

633


What are reported commands?

570


What is unix command line?

612


What is the use of find command in unix?

588


How do I find previous commands in unix?

596


Explain ‘system calls’ with respect to unix commands?

606


What is the behavioural difference between cmp and diff commands?

678


How do you grep a case insensitive?

545


What is rmdir command?

555


Is grep faster than awk?

563