Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is the difference between pipe(|) and tee command..

Answers were Sorted based on User's Feedback



what is the difference between pipe(|) and tee command....

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

what is the difference between pipe(|) and tee command....

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 difference between pipe(|) and tee command....

Answer / guest

seperate arguments

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More Unix Commands Interview Questions

How to delete a directory containing files and folders?

3 Answers  


What is unix command?

0 Answers  


What is s and g in sed command?

0 Answers  


what is the functionality of kernel in unix architecture?

13 Answers   HCL,


how many types of file in unix?

34 Answers   MNC, TCS,


What does the command ' $who | sort –logfile > newfile' do?

0 Answers  


What is use of sed command?

12 Answers   BitWise, Infosys, Reliance,


what does a process mean?

7 Answers   Infosys,


Which command is used to delete all files in the current directory and all its sub-directories?

0 Answers  


What does mkdir up2date; touch outdated up2date do?

2 Answers  


how will you login one server's shell prompt to an another server?

5 Answers   Cosmic Infotech, Perot Systems,


in UNIX,How do you check for processes started by particular user suppose the user name is 'suresh'?

6 Answers  


Categories