<tt>test</tt>: Comparisons



next up previous contents
Next: Testing/Comparing Numbers Up: Programming the Shells Previous: read: Reading Input

test: Comparisons

The basis of many programs is to compare two, three, or more things together. Strings and numbers may be compared. Files are often checked for their lengths and/or existence.

All such verifications are done using variants of the test command.

The general usage of test is

test expression





Super-User
Fri Feb 17 15:55:40 EST 1995