On 3/13/11 8:06 PM, Peggy Russell wrote:
> I got the expected results below, but I didn't get the expected
> expansion in case (3).
>
> I expected to see "+ [[ 0 -eq 0 ]]" and not "+ [[ 0 -eq r ]]".
>
> With set -x, aren't the left and right parameters in a expression
> the final result of all expansions, including arithmetic expansion?
The `r' is not a word expansion. It's a word that's evaluated as an
expression when the command is executed. Arithmetic expansion is
the $((...)) word expansion.
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/