On 3/6/11 3:13 PM, Peggy Russell wrote:
> Hi Chet,
>
> Summary
> *******
> When a variable name and its' value are the same characters (a="a"),
> a recursion error occurs.
Quite true.
If you expand the problem expression, you get
[[ a -lt b ]]
Since those are not numeric, bash treats them as expressions to be
evaluated. You don't have to use the $ to obtain variable evaluation
when using [[ or [. You get:
[[ a -lt b ]]
which bash treats as expressions to be evaluated, since they're not
numeric.
And so on.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/