On Thu, Aug 13, 2009 at 7:58 AM, James Robertson <[email protected]> wrote:

> All
>
> I know that this list is for LFS support, but I figured that I can get
> my question answered here better than anywhere else, so please bear with
> me.
>
> I am writing a shell script for another package I downloaded
> (ntlm-aps).  As part of the script I issue this command:
>
> export http_proxy=http://127.0.0.1:5865
>
> like I would in a profile file (/etc/profile or ~/.bash_profile) to set
> an environment variable.  The issue I am having is the variable does not
> stay resident in my env after the script is finished running.  I can add
> the export to my ~/.bash_profile file and it works when I logon, but the
> variable is only good when ntlm-aps is running in memory so that is why
> I want it to be set when I run the script and not at logon.
>
> Any ideas?
>
> Thanks in advance
> James
> --
> http://linuxfromscratch.org/mailman/listinfo/lfs-support
> FAQ: http://www.linuxfromscratch.org/lfs/faq.html
> Unsubscribe: See the above information page
>

That is one of the biggest flaws in bash. I ran into the same problem a
while back when trying to make a script of mine more modular by dividing it
up into several files. Only way around it that I know of is to export it
into a file, then call that file again after your script has finished. If
anyone knows a better way, please mention it. :)
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to