October 2000
Intermediate to advanced
1152 pages
26h 41m
English
The way the logical comparison of two operators (numeric or string) is done varies slightly in different shells. In pdksh and bash, a command called test can be used to achieve comparisons of expressions. In tcsh, you can write an expression to accomplish the same thing.
This section covers comparisons using the pdksh or bash shells. Later in the chapter, the section tcsh contains a similar discussion for the tcsh shell.
The syntax of the test command is as follows:
test expression
or
[ expression ]
Both forms of test commands are processed the same way by pdksh and bash. The test commands support the following types of comparisons:
String comparison
Numeric comparison
File operators
Logical operators ...
Read now
Unlock full access