From: Jim Meyering Date: Fri, 24 Aug 2001 07:58:15 +0000 (+0000) Subject: 'expr' now requires '+' rather than 'quote' to quote tokens. X-Git-Tag: TEXTUTILS-2_0_15~350 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=aef02ded494848bbac16e0c12148992403cd565c;p=thirdparty%2Fcoreutils.git 'expr' now requires '+' rather than 'quote' to quote tokens. --- diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 51a175b898..6d69b1b2f0 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -333,7 +333,7 @@ Conditions @code{expr}: Evaluate expression -* String expressions:: match substr index length quote +* String expressions:: + : match substr index length * Numeric expressions:: + - * / % * Relations for expr:: | & < <= = == != >= > * Examples of expr:: Examples of using @code{expr} @@ -8138,7 +8138,7 @@ Exit status: @end display @menu -* String expressions:: match substr index length quote +* String expressions:: + : match substr index length * Numeric expressions:: + - * / % * Relations for expr:: | & < <= = == != >= > * Examples of expr:: Examples. @@ -8209,15 +8209,15 @@ Returns the first position in @var{string} where the first character in @findex length Returns the length of @var{string}. -@item quote @var{token} -@findex quote +@item + @var{token} +@kindex + Interpret @var{token} as a string, even if it is a keyword like @var{match} or an operator like @code{/}. -This makes it possible to test @code{expr length quote "$x"} or -@code{expr quote "$x" : '.*/\(.\)'} and have it do the right thing even if +This makes it possible to test @code{expr length + "$x"} or +@code{expr + "$x" : '.*/\(.\)'} and have it do the right thing even if the value of @var{$x} happens to be (for example) @code{/} or @code{index}. -This operator is a GNU extension. It is disabled when -the environment variable @env{POSIXLY_CORRECT} is set. +This operator is a GNU extension. Portable shell scripts should use +@code{@w{" $token"} : @w{' \(.*\)'}} instead of @code{+ "$token"}. @end table