test.sh
#!/bin/bash echo "enter the string:" read filename if test $filename ; then echo "it‘s not zero" else echo "it‘s zero" fi
执行
sudo chmod +x test.sh ./test.sh
输出
enter the string: it‘s zero
执行
./test.sh
输出
enter the string: kk it‘s not zero
原文地址:https://www.cnblogs.com/sea-stream/p/10085845.html
时间: 2024-10-28 13:35:01