fact=1for((number=1;number<=$1;number++))dofact=$(($fact*$number))doneecho the fact of $1 is $fact
Standard input is empty
the fact of is 1
./prog.sh: line 2: ((: number<=: syntax error: operand expected (error token is "<=")
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!