From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Bart Schaefer" Message-Id: <990203002329.ZM10151@candle.brasslantern.com> Date: Wed, 3 Feb 1999 00:23:29 -0800 To: zsh-users@math.gatech.edu Subject: Re: OPTARG not being set? Cc: Sweth Chandramouli MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailing-List: 2068 On Feb 3, 12:03am, Bart Schaefer wrote: } Subject: Re: OPTARG not being set? } } If instead you said $(echo "echo \${$(echo ${bob})}"), then the \$ is not } converted into bare $, and the string becomes "echo \${joe}", and the } result of the whole expression is } } ${joe} One point of additional clarity: As I said, the \$ is not converted to $ when the outer $(echo ...) is parsed; but $(echo ${bob}) is substituted when the quoted string is parsed, which is how it becomes "echo \${joe}". Then, although the backslash is then finally stripped, the $ becomes a quoted character (because of appearing inside quotes), and is thus not lexed as the start of a substitution when the string produced by the outer $(echo ...) is finally executed. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com