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

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

583


What is the comma to display different lines that are found when compare two files?

593


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

630


why metadb requires a seperate slice to create Solaris volume manager

2552


How do you grep recursively?

553






What does this command do? Cat food 1 > kitty

974


What is grep and how do you use it?

571


What are the differences among a system call, a library function, and a unix command?

567


Which unix command lists files/folders in alphabetical order?

614


What is .sh file?

614


Why is it called grep?

557


How many unix commands are there?

624


Explain ‘library functions’ with respect to unix commands?

601


How can you see the command line history?

580


What is grep r?

590