in reply to Unix environment variables for exec process
Probably not related to your problem, but I noticed:
Assuming you want to fold stdout/stderr into file expect.out, you've got the order wrong. It should be written as:$envscript 2>&1 > expect.out;
To see what I mean, run the following commands:$envscript > expect.out 2>&1;
and note the difference.perl -le "print STDERR q{to-stderr};print STDOUT q{to-stdout}" 2>&1 >f +.tmp perl -le "print STDERR q{to-stderr};print STDOUT q{to-stdout}" >f.tmp +2>&1
|
|---|