34 lines
410 B
Bash
Executable File
34 lines
410 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [[ $# -lt 2 ]]
|
|
then
|
|
echo"usage:mult_math.sh <int1> <int2>"
|
|
exit
|
|
fi
|
|
|
|
if [[ $1 -lt 0 ]]
|
|
then
|
|
echo "Argument 1 must be postive !!"
|
|
exit
|
|
fi
|
|
if [[ $2 -lt 0 ]]
|
|
then
|
|
echo "Argument 2 must be postive !!"
|
|
exit
|
|
fi
|
|
if [[ $2 -lt $1 ]]
|
|
then
|
|
echo "Argument 2 must be more than Argument 1"
|
|
exit
|
|
fi
|
|
|
|
for ((i=$1;i<=$2;i++))
|
|
do
|
|
for ((j=$1;j<=$2;j++))
|
|
do
|
|
echo -ne "$((i*j))\t"
|
|
done
|
|
echo -e "\a"
|
|
done
|
|
exit
|