@Isaac, further:
idewitt@wernicke [14] setenv foo bar
idewitt@wernicke [15] echo $foo
bar
idewitt@wernicke [16] sh -C 'echo $foo'
sh: echo $foo: No such file or directory
idewitt@wernicke [17] sh -C 'echo foo'
sh: echo foo: No such file or directory
idewitt@wernicke [18] sh 'echo foo'
sh: echo foo: No such file or directory
idewitt@wernicke [19] sh 'echo $foo'
sh: echo $foo: No such file or directory
This suggests the issue is perhaps more with the passing of commands via "sh" at the command line and not inheritance of environment variables. Hmm...
Edited 1 time(s). Last edit at 12/18/2014 11:32AM by iain.