On Linux (Ubuntu 11.04) in bash, is it possible to temporarily set an environment variable that will only be different from the normal variable for the duration of the scrip
Just put
export HOME=/blah/whatever
at the point in the script where you want the change to happen. Since each process has its own set of environment variables, this definition will automatically cease to have any significance when the script terminates (and with it the instance of bash that has a changed environment).
env VAR=value myScript args ...
VAR1=value1 VAR2=value2 myScript args ...