ITeye博客

get the max num in bash language

luogen33 · 2011-09-06 23:36 · 编程语言 · Markdown

#!/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;

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。