In shell scripting how to find factorial of a number?
Please use this script to find factorial in Bash,
#!/bin/bash num=$1 fact=1 for((i=1; i<=$num; i++)) do let fact=fact*i done echo "Factorial is $fact"