标签:col lse 字符串 chmod class echo sudo 字符串长度 nbsp
test.sh
#!/bin/bash s1="" if test $s1 ;then echo "length is not zero" else echo "the length is 0" fi s2="shell" if test $s2 ;then echo "length is not 0" else echo "the length is 0" fi
执行
sudo chmod +x test.sh
./test.sh
输出
the length is 0 length is not 0
标签:col lse 字符串 chmod class echo sudo 字符串长度 nbsp
原文地址:https://www.cnblogs.com/sea-stream/p/10085960.html