]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(String tests): Improve quality of warning about
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 6 Sep 2004 01:03:20 +0000 (01:03 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 6 Sep 2004 01:03:20 +0000 (01:03 +0000)
quoting strings for the shell.

doc/coreutils.texi

index 531298d260ce2a972952a5613d14578e57323a5d..7033d15a88d4817d58207dbd05418e3284feb3c1 100644 (file)
@@ -9553,9 +9553,15 @@ numbers, i.e., if they are hard links to each other.
 
 @cindex string tests
 
-These options test string characteristics.  Strings are not quoted for
-@command{test}, though you may need to quote them to protect characters
-with special meaning to the shell, e.g., spaces.
+These options test string characteristics.  You may need to quote
+@var{string} arguments for the shell.  For example:
+
+@example
+test -n "$V"
+@end example
+
+The quotes here prevent the wrong arguments from being passed to
+@command{test} if @samp{$V} is empty or contains special characters.
 
 @table @samp