This question already has an answer here:

I understand the basic syntax of this famous fork bomb : ( ) { : | : & } ; : but I am currently struggling to understand the part of : | :, where one pipes the output of : to another :.

What I do not understand is simply that since the function :() takes no parameters and returns nothing when called, how can one pipe its output (what output is it?) to another copy of the same function? Thank you for your time and help!

marked as duplicate by Stephen Kitt, Michael Homer, GAD3R, techraf, dr01 Nov 18 '16 at 9:52

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


The point of the pipe is simply to start new processes faster: the shell (at least, most shells nowadays) starts both sides of a pipe simultaneously. Whether processes input or output anything is of no concern to the shell when it sets the pipe up.

  • Thanks for your help, Stephen. I fear I still do not understand the purpose of :|:. If the output of the first fork bomb has no effect on the process after the pipe, then why don't we just ignore it and write it as ` : ( ) { :& } ; :`? – Nahua Kang Nov 18 '16 at 14:36
  • With { : | : & }, every time : is run you get two more processes, which is what makes this a runaway. { : & : & } might be close but I haven't tested that. – Stephen Kitt Nov 18 '16 at 14:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.