Shell variables are not passed to mcenv unless they are first exported. If the script contains the mcenv command (as opposed to being run as argument of the mcenv command), any variables set before calling mcenv must be exported if they are to be used within the mcenv environment. In the example below, the variable SAT is being passed.