http://twitter.com/jeroenhjanssens/ | |

Blog | http://jeroenjanssens.com/ |

Website | http://jeroenjanssens.com/ |

## Compute factorial of positive integer$ fac() { (echo 1; seq $1) | paste -s -d\* | bc; } ## ExplanationThis one-liner defines a shell function named
Let's break the function down. Assume that we want to compute the factorial of 4. First, it
Then, it uses
Finally, it passes this "equation" to
The actual function uses |