What is the difference between pipe (|) and tee command in unix
Answer Posted / worsame abid
A Pipe is two or more commands seperated by pipe chat "|".
That tells the shell to arrange for the output of the
proceeding command to be passed as input to the following
example.
$ls |wc -l
this will mean that output of ls command will serve as
input for wc command as result we will get total number of
files in current directory.
Tee is normally used to split the output of a program so
that it can be seen on the display and also be saved in a
file ,The tee command reads standard input, then writes its
content to standard output and simultaneously copies it
into the specified file(s) or variables.
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
Which command is used to kill the last background job?
Explain ‘system calls’ with respect to unix commands?
How can you see the command line history?
Why is grep called grep?
Is there a way to erase all files in the current directory, including all its sub-directories, using only one command?
What does the md command do?
How can we use grep command in unix?
Write a command to display a file’s contents in various formats?
What is .sh file?
What is the unix command to confirm a remote host is alive or not?
Name the various commands that are used for the user information in unix.
How to display no of records in oracle using unix command?
Name the general commands in using unix os for a beginner?
What are bash commands?
What is unix command line?