UNIX pipes: male | female > baby
What happens when you execute the following command on a Unix system?
Unix pipes (called from shell with the "|" character) reroute the output of the process on the left to the input of the process on the right. In this case, whatever male outputs to stdout, female will receive in stdin.
What happens to the output of female?
If we would have called this line:
However, the ">" character allows you to capture the output of the last process to a file. In the first case, a file called baby.
Disclaimer: I realize this would make a cool line for the birth announcement, but it isn't one ;)
male | female > babyIt will start two processes (in this case male and female) pre-supposing you have them in one of your bin or sbin folders.
Unix pipes (called from shell with the "|" character) reroute the output of the process on the left to the input of the process on the right. In this case, whatever male outputs to stdout, female will receive in stdin.
What happens to the output of female?
If we would have called this line:
male | femalethe stdout of the last process (in this case female) will be displayed on your screen.
However, the ">" character allows you to capture the output of the last process to a file. In the first case, a file called baby.
Disclaimer: I realize this would make a cool line for the birth announcement, but it isn't one ;)
i will update soon above the input programme coding selenium Training in Bangalore | Oracle Training in Bangalore
ReplyDeleteHi, i hope to level really understand for this wonderful information..Thanks you so much..
ReplyDeleteInformatica Training in Chennai
Thanks for giving the great article...!
ReplyDeleteCcna Training in Chennai
Nice Article about Unix pipes and its too informative....
ReplyDeleteAndroid Training in bangalore