I managed to finally figure out how to use withenv with two arguments (the first has to be a lambda or function with no parameters).
But the documentation here: http://julia.readthedocs.org/en/latest/stdlib/base/#Base.withenv indicates that withenv can also be used with a do..end block. However, try as I might, I cannot figure out how to do anything with this. Can someone provide an example of this in operation. Whilst I'm asking trivial questions, I may as well also ask this related one. If I do: run(`echo \$PATH`) it returns: $PATH instead of the contents of the environment variable PATH, as it would if I did: echo $PATH at the shell prompt. What is the reason for this difference? How would I echo an environment variable using run(`echo ...`)? (Of course I realise there is another way to do the same thing using ENV.) Bill.
