In Ubuntu if is executed the man test command appears the following:
TEST(1) User Commands TEST(1)
NAME
test - check file types and compare values
SYNOPSIS
test EXPRESSION
test
[ EXPRESSION ]
[ ]
[ OPTION
DESCRIPTION
Exit with the status determined by EXPRESSION.
...
Observe the following part:
SYNOPSIS
test EXPRESSION
test
[ EXPRESSION ]
[ ]
[ OPTION <-----
Is [ OPTION an error? It should be [ OPTION ] right?
Conditional expressions are used by the [[ compound command (see Conditional Constructs) and the test and [ builtin commands (see Bourne Shell Builtins). The test and [ commands determine their behavior based on the number of arguments; see the descriptions of those commands for any other command-specific actions."
I cant find any examples.
[ seems to be a synonym for test … ie you can use [ anywhere you can use the word test