判断参数是否为空-空退出并打印null #!/bin/sh echo $1 name=${1:?"null"} echo $name 转载于:https://www.cnblogs.com/sharesdk/p/8710133.html