summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2004-09-06 01:03:20 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2004-09-06 01:03:20 +0000
commitac161f59f7a20b245107d0ccd0fc570943871f3d (patch)
treeb161a52d401dd9fd67f1264ff49245aea52353b3 /doc
parent3427d5c60c7edd57641c052ca6d86afa9ecaa360 (diff)
downloadcoreutils-ac161f59f7a20b245107d0ccd0fc570943871f3d.tar.xz
(String tests): Improve quality of warning about
quoting strings for the shell.
Diffstat (limited to 'doc')
-rw-r--r--doc/coreutils.texi12
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 531298d26..7033d15a8 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -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