| Back to Questions Page |
| Question |
What is the difference between pipe (|) and tee command in unix |
Rank |
Answer Posted By |
|
Interview Question Submitted By :: Jkonakan |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer |
pipe is used to direct the output of a set of commands to
another set of commands meaning output of one will be fed
as input to the other
tee is used to display the output on the screen  |
2 | Jaydeep Das |
| |
| |
| Answer |
pipe is used to execute two or more commands
eg:select ename||'works as '||job from emp;
tee is used to create an empty file,stores the output and
then displays the contents on the screen
eg: grep "^d" filename||tee file  |
0 | Ruth Suganya Sebastian [Wipro] |
| |
| |
| Answer |
seperate arguments  |
0 | Guest [Wipro] |
| |
| |
|
|
| |
| Answer |
'|' --> This will take output and send it as the input for
next command
tee --> tee will generate two outputs  |
2 | Manikantan T S [Wipro] |
| |
| |
| Question |
what is the difference between pipe(|) and tee command.. |
Rank |
Answer Posted By |
|
Interview Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer |
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
 |
2 | Mohit Chandila |
| |
| |
| Answer |
seperate arguments  |
0 | Guest |
| |
| |
|
| |
|
Back to Questions Page |