CoolInterview.com - World's Largest Collection of Interview Questions
Send Free SMS
 Interview Questions  
 Our Services  


INTERVIEW QUESTIONS OPERATING SYSTEMS UNIX COMMANDS DETAILS
Question :
What is a pipe and give an example?
Category Unix Commands Interview Questions
Rating (5.0) By 2 users
Added on 10/25/2004
Views 2723
Rate it!
Answers:

A pipe is two or more commands separated by pipe char '|'. That tells the shell to arrange for the output of the preceding command to be passed as input to the following
command.
Example : ls -l | pr
The output for a command ls is the standard input of pr.
When a sequence of commands are combined using pipe, then it is called pipeline.



In Unix Pipe is a way of interprocess communication. In other words it is a mechanism in which o/p of a command can be redirected as Input of other command. For e.g

[rsingh@myLaptop ~]$ ps | wc -l
4
[rsingh@myLaptop ~]$



 Posted by: Raghvendra    

Contact Raghvendra  Contact Raghvendra

Pipe is a way of interprocess communication. In other words it is a mechanism in which o/p of a command can be redirected as Input of other command. For e.g

cat <filename> | wc -l

<writing end> <pipe> <reading end>

it's a flow from writing end to reading end.



 Posted by: Amaresh Chandra Das    

Contact Amaresh Chandra Das  Contact Amaresh Chandra Das


If you have the better answer, then send it to us. We will display your answer after the approval.
Name :*
Email Id :*
Answer :*
Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
Process Verification  Enter the above shown code:*
Inform me about updated answers to this question

   
Related Questions
View Answer
How to terminate a process which is running and the specialty on command kill 0?
View Answer
What is redirection?
View Answer
What are shell variables?
View Answer
How to switch to a super user status to gain privileges?
View Answer
How does the kernel differentiate device files and ordinary files?
View Answer
How many prompts are available in a UNIX system?
View Answer
Name the data structure used to maintain file identification?
View Answer
Is it possible to count number char, line in a file; if so, How?
View Answer
Is ?du? a command? If so, what is its use?
View Answer
What is the use of the command "ls -x chapter[1-5]"
View Answer

Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

Notify me when better answer is posted!
Email:

View ALL Unix Commands Interview Questions

User Options
Sponsored Links


Copyright ©2003-2010 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions
Page URL: http://www.coolinterview.com/interview/2503/default.asp?cachecommand=bypass


Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Free SMS | Dedicated Servers | Joke of the Day

0.67