Re: set -x and parameter expansion

2011-03-13 Thread Peggy Russell
> 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. The command being [[ and the dollar-sign indicating the expansion. This helps clarify the "set -x" difference below which show

Re: set -x and parameter expansion

2011-03-13 Thread Chet Ramey
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 ex

set -x and parameter expansion

2011-03-13 Thread Peggy Russell
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? Isn't that en