GNU Info

Info Node: (sh-utils.info)String tests

(sh-utils.info)String tests


Next: Numeric tests Prev: File characteristics tests Up: test invocation
Enter node , (file) or (file)node

String tests
------------

   These options test string characteristics.  Strings are not quoted
for `test', though you may need to quote them to protect characters
with special meaning to the shell, e.g., spaces.

`-z STRING'
     True if the length of STRING is zero.

`-n STRING'
`STRING'
     True if the length of STRING is nonzero.

`STRING1 = STRING2'
     True if the strings are equal.

`STRING1 != STRING2'
     True if the strings are not equal.


automatically generated by info2www version 1.2.2.9