shell指令碼報錯:"[: =: unary operator expected"

oxoxooxx發表於2011-10-12
shell指令碼報錯:"[: =: unary operator expected"
if [ $RETURN == "OK" ];
then
echo "OK"
fi
此種情況若RETURN為空,則判定為 [ = "OK"],[與"OK"匹配缺少'['。[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23937368/viewspace-1055620/,如需轉載,請註明出處,否則將追究法律責任。

相關文章