answersLogoWhite

0

factor NUMBER

Example:

$ factor 815

815: 5 163

I think he meant more along the lines of the product of the numbers that add up to the number from 1.

So like this:

10! = 10 * 9 * 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1

Unfortunately, I have not been able to find any command that does factorials. The 'bc' command would have been the perfect choice because of its abilities to calculate extremely high values like 2^1000. How ever since you know how factorials work (multiplication), you can actually just make one for yourself.

The commands:

let, bc, expr, [], etc are helpful for mathematical expressions in bash

User Avatar

Wiki User

12y ago

What else can I help you with?