bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: variable name and its' value are the same characters causes recursio


From: Chet Ramey
Subject: Re: variable name and its' value are the same characters causes recursion error
Date: Wed, 09 Mar 2011 14:02:55 -0500
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7

On 3/7/11 11:48 PM, Peggy Russell wrote:

> It would be helpful if indirection was explained in the documentation for
> [[ expression ]], [ expression ], and declare.

The existing documentation seems pretty clear:

Shell variables  are  allowed as operands; parameter expansion is per-
formed before the expression is evaluated.  Within an expression, shell
variables  may  also  be referenced by name without using the parameter
expansion syntax.  A shell variable that is null or unset evaluates  to
0 when referenced by name without using the parameter expansion syntax.
The value of a variable is evaluated as an arithmetic  expression  when
it  is  referenced, or when a variable which has been given the integer
attribute using declare -i is assigned a value.  A null value evaluates
to  0.   A shell variable need not have its integer attribute turned on
to be used in an expression.


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]