export variable question

simple question:

for example if i use:

export http_proxy=proxy:8080

and i have this script:

while true; do
....
lynx Google
;;
wget The UNIX and Linux Forums - Learn UNIX and Linux from Experts
;;
...
esac
done

So i must "export http_proxy=proxy:8080" before any lynx and wget command or...
can i insert "export http_proxy=proxy:8080" at the beginning of the script and export function is always true for any commands like lynx, wget and so on that support http_proxy variable (?)

Once you export the variable it will be visible to all new processes and/or sub/newshells.
So the answer is yes.

Thank you @radoulov :slight_smile:

Last question:

So, how can i unset http_proxy variable before exit to the script?

unset http_proxy

LOL...Thank you :stuck_out_tongue: