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
What is the first character of the output in ls l command?
Are you in or at the office?
What is grep r?
What does the command ' $who | sort –logfile > newfile' do?
Explain the terms ‘system calls’ and ‘library functions’ with respect to unix commands?
Why is awk called awk?
How does pipe () work?
What is the use of find command in unix?
Which command is used to kill the last background job?
Is there a way to erase all files in the current directory, including all its sub-directories, using only one command?
What is unix command?
Why is grep called grep?
Which command will print your home directory on screen?
Why is shebang used?
What is time_t?