The working of a while, until or if construct depends upon whether
or not a command has a successful status. The test command provides
methods for file and string checking as well as for numerical and logical
comparisons and translates the result of such an operation into language the
control statement can understand, that is, success or failure.
General form:
test expression
Alternative form:
[ expression ]
The following primitives are used to construct expression: