From ac161f59f7a20b245107d0ccd0fc570943871f3d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 6 Sep 2004 01:03:20 +0000 Subject: (String tests): Improve quality of warning about quoting strings for the shell. --- doc/coreutils.texi | 12 +++++++++--- 1 file 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 -- cgit v1.2.3-54-g00ecf