some sytem scripts

This commit is contained in:
Marina Wahl 2014-07-05 18:22:01 -04:00
parent 4b0a965e4a
commit 5852171b21
25 changed files with 639 additions and 1 deletions

View file

@ -0,0 +1,18 @@
#! /bin/bash
n=0
on=0
fact=1
echo -n "Enter number to find factorial : "
read n
on=$n
while [ $n -ge 1 ]
do
fact=`expr $fact \* $n`
n=`expr $n - 1`
done
echo "Factorial for $on is $fact"