Explanation:- Here 30 and 12 are input to the bash script. It is accessed by script using $1 and $2. Here n1 is 30 and n2 os 20.

3. Write a bash script to find factorial of a number.

#!/bin/bash#find factorial of a number - input Passed as command line arguments n=$1#Input passed via command line is stored in n fact=1
for i in `seq 1 $n`;do((fact=fact*i))doneprintf"factorial of number %d is: %d\n"$n$fact

Sample output:-
[zytham@s158519-vm scripts]$ sh bico.sh 9 3
Binomial coefficient of C(9 3) is 60480
[zytham@s158519-vm scripts]$ sh bico.sh 8 4
Binomial coefficient of C(8 4) is 1680
[zytham@s158519-vm scripts]$ sh bico.sh 5 2
Binomial coefficient of C(5 2) is 60Explanation:- Two input is passed from command line and that is propagated to function one by one to find factorial of M , N and M-N. Similar to bash script function also access passed argument as $1.

5. WABS to check numbe is perfect number or not - input passed from command line. ( A perfect number is a positive integer that is equal to the sum of its proper positive divisors, that is, the sum of its positive divisors excluding the number itself )