!/bin/bash
if [ $# -ne 3 ]; then
echo “Input error”
exit 1
fi
if [ 1−gt1−gt2 ]; then
MAX=1MIN=1MIN=2
else
MAX=2MIN=2MIN=1
fi
if [ MAX−ltMAX−lt3 ]; then
MAX=$3
fi
if [ MIN−gtMIN−gt3 ]; then
MIN=$3
fi
echo “max=MAX,min=MAX,min=MIN”
---------------------
作者:cy941228
来源:CSDN
原文:https://blog.csdn.net/cy941228/article/details/53750237
版权声明:本文为博主原创文章,转载请附上博文链接!