!/bin/bash
if [ $# -ne 3 ]; then
echo “Input error”
exit 1
fi
if [ 1−gt2 ]; then
MAX=1MIN=2
else
MAX=2MIN=1
fi
if [ MAX−lt3 ]; then
MAX=$3
fi
if [ MIN−gt3 ]; then
MIN=$3
fi
echo “max=MAX,min=MIN”
if [ $# -ne 3 ]; then
echo “Input error”
exit 1
fi
if [ 1−gt2 ]; then
MAX=1MIN=2
else
MAX=2MIN=1
fi
if [ MAX−lt3 ]; then
MAX=$3
fi
if [ MIN−gt3 ]; then
MIN=$3
fi
echo “max=MAX,min=MIN”