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


Please Help Members By Posting Answers For Below Questions

How do you grep a case insensitive?

545


Why is it called grep?

564


What is the search command in unix?

607


What does sed command do in unix?

568


What is unix command line?

612






Who wrote grep?

589


How can we use grep command in unix?

621


How is the command '$cat file2 ' different from '$cat >file2 and >> redirection operators ?

764


What difference between cmp and diff commands?

727


Is command prompt unix?

586


What does touch command do in unix?

733


What is the first character of the output in ls l command?

637


What does pipe () return?

598


What is the unix command to confirm a remote host is alive or not?

588


Differentiate cat command from more command.

580