Linda Walsh wrote:
> I didn't know why it behaved differently, but as you informed me
> the difference is 'one's well-defined, and the other is not, I can
> see why there 'could' be a difference... ;-)
> 
> (which of course could change tomorrow, I suppose..)

Not the second well defined case.  It can't change without being in
conflict with the standards.  You would always be safe to use it in
any standard conforming shell.

If you are still not convinced then consider these next two examples.

  #!/bin/sh
  printfoovar() { echo $foo ;}
  foo="bar"
  ( printfoovar )

  #!/bin/sh
  printfoovar() { eval echo \$$foo ;}
  bar="hello"
  foo="bar"
  ( printfoovar )

Bob

Reply via email to