How do I set bash environment variables from a script?
        Posted  
        
            by James A. Rosen
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by James A. Rosen
        
        
        
        Published on 2010-06-17T19:44:18Z
        Indexed on 
            2010/06/17
            19:53 UTC
        
        
        Read the original article
        Hit count: 226
        
I have some proxy settings that I only occasionally want to turn on, so I don't want to put them in my ~/.bash_profile. I tried putting them directly in ~/bin/set_proxy_env.sh, adding ~/bin to my PATH, and chmod +xing the script but though the script runs, the variables don't stick in my shell. Does anyone know how to get them to stick around for the rest of the shell session?
© Stack Overflow or respective owner