Evaluate expression and return zero exit status if result is true, non zero status otherwise.
expression is one of:
the strings are equal
the strings are not equal
string1 is lexicographically less than string2
string1 is lexicographically less or equal than string2
string1 is lexicographically greater than string2
string1 is lexicographically greater or equal than string2
integer1 is equal to integer2
integer1 is greater than or equal to integer2
integer1 is greater than integer2
integer1 is less than or equal to integer2
integer1 is less than integer2
integer1 is not equal to integer2
integer1 is greater than integer2 after stripping off common non-numeric prefix.
integer1 is less than integer2 after stripping off common non-numeric prefix.
file1 is newer than file2 (modification time). Optionally numeric bias may be directly appended to
-nt in which case it is added to the first file modification time.
file1 is older than file2 (modification time). Optionally numeric bias may be directly appended to
-ot in which case it is added to the first file modification time.
file exists and is a directory
file exists and is not a directory
file exists and has a size greater than zero
the length of string is nonzero
string is equivalent to
the length of string is zero
expression is true
expression is false
both expression1 and expression2 are true
both expression1 and expression2 are true. This syntax is not POSIX-compliant and is not recommended.
either expression1 or expression2 is true