shell 字符串为空判断

shell 字符串为空判断

1,字符串

-z 字符串 判断字符串是否为空 为空返回真
-n 字符串 判断字符串是否为非空 非空返回真

参考:

  1. linux shell 中判断字符串为空的正确方法

猜你喜欢

转载自blog.csdn.net/u010953692/article/details/107952912