What is the difference between pipe (|) and tee command in unix

Answers were Sorted based on User's Feedback



What is the difference between pipe (|) and tee command in unix..

Answer / rajib mallick

PIPE- "|" :- **. It is an IPC(Inter Process Communication).
*. It means that the out put of the first command is the
Input of the second command.
**. Like wise 3rd, 4th, 5th.....nth.
tee :- **. tee generates two outputs always.
**. It's a filter ! by using tee we can send the output to
a new file at the same moment we can see the output on the
screen.

..for any query you can e-mail me on "rajib.ku@gmail.com".

Is This Answer Correct ?    46 Yes 0 No

What is the difference between pipe (|) and tee command in unix..

Answer / jaydeep das

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

Is This Answer Correct ?    51 Yes 21 No

What is the difference between pipe (|) and tee command in unix..

Answer / ruth suganya sebastian

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

Is This Answer Correct ?    49 Yes 22 No

What is the difference between pipe (|) and tee command in unix..

Answer / manikantan t s

'|' --> This will take output and send it as the input for
next command

tee --> tee will generate two outputs

Is This Answer Correct ?    32 Yes 7 No

What is the difference between pipe (|) and tee command in unix..

Answer / sourisengupta

pipe: pipe is used to redirect the output to theinput of an
another command.

tee: tee is used to prodiuced two output and you can
redirect it anywhere you want;.

Is This Answer Correct ?    11 Yes 5 No

What is the difference between pipe (|) and tee command in unix..

Answer / madhusudhan

pipe: pipe is used to redirect the output to the input of an
another command.

to see oracle processes.
ps -ef | grep SIDNAME

Here grep will find the sidname and the output of grep will be used as input to display processes.

tee : using tee we can send the output to
a new file at the same time we can see the output on the
screen

Is This Answer Correct ?    5 Yes 1 No

What is the difference between pipe (|) and tee command in unix..

Answer / 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

What is the difference between pipe (|) and tee command in unix..

Answer / nagarjuna reddy

PIPE(|)
command is used send the output of one command as a input for another command
tee
command is used to write the same data to the multiple files

Is This Answer Correct ?    1 Yes 0 No

What is the difference between pipe (|) and tee command in unix..

Answer / thina

ls |wc-l |tee 1.txt
step 1: listing of file and folders
step 2: counting No of Lines
step 3: tee command getting output from above steps and
stres in the file

Is This Answer Correct ?    0 Yes 0 No

What is the difference between pipe (|) and tee command in unix..

Answer / manoj

Pipe command.
syntax :$command1|command2
Command1 output will be the input for command2
Eg:command1:echo$s
command2:wc

echo$s|wc
s=manoj is input of command1
Output for command2 is manoj
input of command 2 is manoj
output of pipe command is 5
Output:5

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Unix Commands Interview Questions

What is the comma to display different lines that are found when compare two files?

0 Answers  


what is the use of "grep" command?

6 Answers   HCL,


what is virtual machine?

2 Answers   Infosys,


What is command substitution?

0 Answers  


Why is it called a shebang?

0 Answers  






what is the command to find out the difference between files and folders?

6 Answers  


what is the use of "fg" command ?

5 Answers   PSU, Sail,


what is the command to get help on a UNIX terminal?

5 Answers  


How to find and replace the below command?

2 Answers   HCL,


What is pipe command in unix?

0 Answers  


What is in grep command?

0 Answers  


How many bits use for MAC address?

7 Answers   Google,


Categories