Shell Builtin Command 「[」

請對照「test」的說明。

type [

執行

$ type [

顯示

[ is a shell builtin

執行

$ type -a [

顯示

[ is a shell builtin
[ is /usr/bin/[

help [

執行

$ help [

顯示

[: [ arg... ]
    Evaluate conditional expression.

    This is a synonym for the "test" builtin, but the last argument must
    be a literal `]', to match the opening `['.