testコマンド 戻り値判定通常の判定[ "a" = "a" ] && echo "OK" if [ "a" != "b" ]; then echo "OK" fi 特殊変数$?による判定[ "a" = "a" ] if [ $? -eq 0 ]; then echo "OK" fi 参考 |
|
testコマンド 戻り値判定通常の判定[ "a" = "a" ] && echo "OK" if [ "a" != "b" ]; then echo "OK" fi 特殊変数$?による判定[ "a" = "a" ] if [ $? -eq 0 ]; then echo "OK" fi 参考 |
|