Dan Jacobson <[EMAIL PROTECTED]> writes:

> Please add a warning.

There's already a warning in the coreutils documentation, but I made
it a bit more explicit as follows:

2004-09-05  Paul Eggert  <[EMAIL PROTECTED]>

        * doc/coreutils.texi (String tests): Improve quality of warning about
        quoting strings for the shell.

Index: coreutils.texi
===================================================================
RCS file: /home/eggert/coreutils/cu/doc/coreutils.texi,v
retrieving revision 1.203
retrieving revision 1.204
diff -p -u -r1.203 -r1.204
--- coreutils.texi      3 Sep 2004 08:00:48 -0000       1.203
+++ coreutils.texi      6 Sep 2004 01:03:20 -0000       1.204
@@ -9553,9 +9553,15 @@ numbers, i.e., if they are hard links to
 
 @cindex string tests
 
-These options test string characteristics.  Strings are not quoted for
[EMAIL PROTECTED], 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
[EMAIL PROTECTED] arguments for the shell.  For example:
+
[EMAIL PROTECTED]
+test -n "$V"
[EMAIL PROTECTED] example
+
+The quotes here prevent the wrong arguments from being passed to
[EMAIL PROTECTED] if @samp{$V} is empty or contains special characters.
 
 @table @samp
 



_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to