10/03/25 07:38:08 woPIYugI
>>728
UNIX板で知った
URLリンク(www.opengroup.org)
の、APPLICATION USAGE から先が勉強になったです。
-a や -o より && や || でつなぐ方がよいとか。お題の部分についてはこれ。
test "$1" = "bat" -a "$2" = "ball"
syntax errors occur if $1 evaluates to '(' or '!'.
One of the following forms prevents this; the third is preferred:
test "X$1" = "Xbat" -a "X$2" = "Xball"
test "$1" = "bat" && test "$2" = "ball"
test "X$1" = "Xbat" && test "X$2" = "Xball"