标签:ash bsp sssss shel enter name string read chm
test.sh
#!/bin/bash echo "enter the string:" read filename if test -z $filename ; then echo "the length is 0" else echo "the length is not 0" fi
执行
sudo chmod +x test.sh
./test.sh
输出
enter the string: the length is 0
执行
./test.sh
输出
enter the string: sssssss the length is not 0
标签:ash bsp sssss shel enter name string read chm
原文地址:https://www.cnblogs.com/sea-stream/p/10085859.html