i'm not totally sure about this, but it should work as i describe below: try: source script-file if the script file contains commands they will run, and exported vars will be exported.