Shell字符串判断
http://www.manongjc.com/detail/28-pvktparedhhxedw.html
判断字符串不为空
[ -n "$a" ]
如果变量a没有定义,则一定要加双引号
判断字符串为空
[ -z "$a"] 或 [ -z $a]
http://www.manongjc.com/detail/28-pvktparedhhxedw.html
[ -n "$a" ]
如果变量a没有定义,则一定要加双引号
[ -z "$a"] 或 [ -z $a]