代码: 全选
#!/bin/bash
max2()
{
if [ -z "$2" ]
then
return $128
fi
if["$1" -eq "$2"]
then
return $128
else
if["$1" -gt "$2"]
then
return $1
else
return $2
fi
fi
}
max2 1 2
echo $?
代码: 全选
#!/bin/bash
max2()
{
if [ -z "$2" ]
then
return $128
fi
if["$1" -eq "$2"]
then
return $128
else
if["$1" -gt "$2"]
then
return $1
else
return $2
fi
fi
}
max2 1 2
echo $?