# ---------------------------------------------------------------
# Process command-line arguments 处理命令行参数
# ---------------------------------------------------------------
while getopts :i:l:s:u:c: opt
do
case "$opt" in
i) INT="$OPTARG";;
l) LogFile="$OPTARG";;
s) SEC="$OPTARG";;
u) Util="$OPTARG";;
c) COUNT="$OPTARG";;
\?) usage;;
esac
done
# ---------------------------------------------------------------
# Input validation 输入校验
# ---------------------------------------------------------------
if [ -z "$INT" ]
then
echo "error: invalid Augument interface in OPTION -i "
usage
exit 1
fi
# ---------------------------------------------------------------
# Set values, if unset... 设置默认值
# ---------------------------------------------------------------