Find max and min number from the data passed through command line using Linux shell script in Ubuntu

Maximum

echo enter number 1
read n1
echo enter numer 2
read n2
if [$n1 -gt $n2]
then
echo $n1 is max
else
echo $n2 is max
fi


-----------------------------
Minimum

echo enter number 1
read n1
echo enter numer 2
read n2
if [$n1 -lt $n2]
then
echo $n1 is minimum
else
echo $n2 is minimum
fi

-----------------------------
Maximum from three numbers 

echo enter number 1
read n1
echo enter number 2
read n2
echo enter number 3
read n3
if [ $n1 -gt $n2 -a $n1 -gt $n3 ]
then
       echo $n1 is max
elif [ $n2 -gt $n1 -a $n2 -gt $n3 ]
then
echo $n2 is max
else
echo $n3 is max
fi