問題:
I'm looking at the following code:我正在查看以下代碼:
if [ -z $2 ]; then
echo "usage: ...
(The 3 dots are irrelevant usage details.) (這 3 個點是不相關的使用細節。)
Maybe I'm googling it wrong, but I couldn't find an explanation for the -z
option.也許我在谷歌上搜索錯了,但我找不到-z
選項的解釋。
解決方案:
參考一: https://en.stackoom.com/question/1Dvlm參考二: https://stackoom.com/question/1Dvlm