shell 判断为空打印


判断参数是否为空-空退出并打印null

#!/bin/sh
echo $1
name=${1:?"null"}
echo $name

 

posted @ 2018-04-03 18:02  01234567  阅读(547)  评论(0编辑  收藏  举报