get the max num in bash language
#!/bin/bash
#get the max num
echo;
echo "------test get the max num of two nums----- ";
EQUAL=0;
E_PARAM_ERR=-9999;
max2()
{
if
then
echo $E_PARAM_ERR;
return;
fi
if
then
echo $EQUAL;
return;
else
if
then
ret=$1;
else
ret=$2;
fi
fi
#can't use the return sentence,in here .
#because the method can return not big 255
echo $ret;
} num=$(max2 200 500); echo $num; echo;