Re: set -x and parameter expansion

2011-03-14 Thread Chet Ramey
On 3/14/11 2:38 AM, Peggy Russell wrote: > This helps clarify the "set -x" difference below which show $r going through > parameter expansion done by the shell before the command [[ sees the > expression. > Okay... > > command [[ that > contains expr set -x > --

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