#!/bin/bash # $1 gpuid $2 workdir $3 model_path if [ $# -ne 2 ]; then echo "$1 gpuid param required" echo "$2 change workdir required" exit fi
shell 检查脚本输入参数个数
原文:https://www.cnblogs.com/TianyuSu/p/14719508.html