This was the one and only line in the script
export http_proxy=
I tried to invoke the script as normal
sh proxy.sh
The scripts works fine but the proxy settings does'nt change.
After lot of googling I found that it will work if we invoke in some other way.
. proxy.sh
([space] [dot]
It worked...
I don't know what does dot

Hellloooo..
ReplyDeletethis is because unix spawns sub shells when it sees scripts....
But u can prevent it from starting a sub shell using "." the DOT command.which will run in the same shell....
following link may be useful
http://www.kingcomputerservices.com/unix_101/understanding_unix_shells_and_environment_variables.htm