coreutils: String tests

1 
1 16.3.4 String tests
1 -------------------
1 
1 These options test string characteristics.  You may need to quote STRING
1 arguments for the shell.  For example:
1 
1      test -n "$V"
1 
1    The quotes here prevent the wrong arguments from being passed to
1 ‘test’ if ‘$V’ is empty or contains special characters.
1 
1 ‘-z STRING’
1      True if the length of STRING is zero.
1 
1 ‘-n STRING’
1 ‘STRING’
1      True if the length of STRING is nonzero.
1 
1 ‘STRING1 = STRING2’
1      True if the strings are equal.
1 
1 ‘STRING1 == STRING2’
1      True if the strings are equal (synonym for =).
1 
1 ‘STRING1 != STRING2’
1      True if the strings are not equal.
1