Testing
The test command performs a test or combination of tests and
- returns a zero exit status if the test succeeds
- returns a non-zero exit status if the test fails
Provides a variety of useful testing features:
- string comparison (
= != )
- numeric comparison (
-eq -ne -lt )
- checks on files (
-f -x -r )
- boolean operators (
-a -o ! )
|