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