6 ms·
I'm not sure why : has been chosen as the canonical fork bomb function name, but it's more readable with something like resurse() { recurse | recurse &}; recur
by johnswamps 16y ago
I'm not sure why : has been chosen as the canonical fork bomb function name, but it's more readable with something like
resurse() { recurse | recurse &}; recurse
- kmort 16y agoAnd it's usually accompanied by the adjective "elegant", which I find rather baffling. "Cute" or "cryptic", perhaps.
- marbu 16y agoIn this example, the poor readability is a feature. Nevertheless the ":" character is bash inner function, which tells the shell to do nothing (except the arguments expansion), like pass in python. This means that you can redefine it and use it to confuse others. Most of other special characters are not functions so you are not able to redefine them that easily.