19,612
社区成员
发帖
与我相关
我的任务
分享
cd /app/
optime=$(date +%Y%m%d)
oprun='test_inter_v1'
while getopts :r:t option
do
case "$option" in
t)
if [[ -n $OPTARG ]]; then
optime=$OPTARG
fi
;;
r)
if [[ -n $OPTARG ]]; then
if [ "$OPTARG" = "table" ]; then
oprun="test_tab_v1"
elif [ "$OPTARG" = "interface" ]; then
oprun="test_inter_v1"
fi
fi
;;
esac
done
# 问题简述在下面:
# 下面这个地方调用传递进来的所有参数,但是要排除掉-t和-r,请问怎么排除掉呢?谢谢。
java -jar -Dfile.encoding=GBK test.jar -isDebug false "-f $oprun -t $optime "