On Mon, Feb 1, 2010 at 17:11, Ty John <ty-ml at eye-of-odin.com> wrote: > Basically, I want to set and unset the variable when I connect and > disconnect the VPN. The best way is probably to have a set of aliases in your bashrc that run it and set the variables. Scripts and functions cannpt modify the calling environment.