Next: Numeric tests, Previous: File characteristic tests, Up: test invocation [Contents][Index]
These options test string characteristics. You may need to quote string arguments for the shell. For example:
test -n "$V"
The quotes here prevent the wrong arguments from being passed to
test if ‘$V’ is empty or contains special characters.
True if the length of string is zero.
True if the length of string is nonzero.
True if the strings are equal.
True if the strings are equal (synonym for =).
True if the strings are not equal.