what is the difference between pipe(|) and tee command..
Answers were Sorted based on User's Feedback
Answer / manoj gadtia
pipe direct output of one command to the input of another
command
ls -l | wc
tee command reads standard input, then writes the output
to standard output and simultaneously copies it into the
specified file or files
ls -l | wc -l | tee out.txt
It shows the output and also write the result into out.txt
file
| Is This Answer Correct ? | 9 Yes | 1 No |
Answer / 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 |
What is the Unix file system hierarchy?
What is the comma to show the space allocation of files?
How do I search for text in vi?
hi i have directories within the directory. Now i want to copy the directory along with all directories included in it to one location by using copy command? what is the command
How to open a Database using Unix Command Please Do Reply
Differentiate cmp command from diff command.
why metadb requires a seperate slice to create Solaris volume manager
What Is the command to change a file's creation time. means one file is created at the time 15:19 then time should br changed to 14:14
What is the functionality of a top command?
What is the difference between a hard link and a soft link in Unix?
Assume the following files are in the working directory prompt> ls -l tasks -rw-r--r-- 1 alex student 1423 Feb 21 14:01 tasks What command can Alex use to give everyone permission to write to the file? What will the ls -l command display if he does so?
By using which command we can find the CPU utilization time?