Does anyone know what are pipes, what are they used for, and why would they be used?
Printable View
Does anyone know what are pipes, what are they used for, and why would they be used?
Pipes give processes a way to communicate.
unless your talking about plumbing I have no idea ;D
msft has a good section though:
http://msdn.microsoft.com/library/de...sing_pipes.asp
check out the example on allapi ... kinda cool
http://www.allapi.net/apilist/CreatePipe.shtml
OK, but do you know how pipes work?Quote:
Originally posted by Shawn N
Pipes give processes a way to communicate.
Much like files. What are you getting at?Quote:
Originally posted by Microbasic
OK, but do you know how pipes work?
OK this is what I understand about pipes that I learnt from Unix. You use a pipe when you want the output of one program to become the input of another, e.g
The output of cat usually goes to the screen but in the above case it goes to the awk command which uses it as input, prints the first column of each record. The nice thing about pipes in Unix is that it avoids you from creating temporary files to store intermediate results and most interesting of all you can combine many small command line utilities using pipes to produce great tools and functionalities. Of course the Unix commands do not make any assumptions about their inputs, for example they don't expect all their inputs to come from the keyboard, in fact all inputs (keyboards, mouse, ouput from a file) are considered as devices.Code:cat infile.txt | awk '{print $1'}
Well thats an explanation from the Unix world, I don't know if it answers your question.