next up previous
Next: Special Shell Characters And Up: Looping and Making Choices Previous: The case Statement

The test command

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:



Roger Hampel
Mon Feb 2 09:39:25 MET 1998