Bash:- 通过while和shift判断脚本位置参数格式是否合法 if[[ $# -lt2]];thenecho"请输入2个位置参数..."exit1elsenum=$#while(($#>=1));docase${num}in2)if!echo"${1}"|grep-qP"\d+\.\d+\.\d+\.\d+";thenecho"中心机IP输入格式不对..."exit1fiSALT_MASTER_IP=${1} ;;1)if!echo"...