I have a bash script to write proxy into /etc/profile
and source it.
This is the snippet of the script
#!/bin/bash
configureEnv(){
cat >> /etc/profile <<EOF
export SOCKS_SERVER=http://proxy.mycompany.com:1080
export HTTP_PROXY=http://proxy.mycompany.com:911
EOF
source /etc/profile
}
configureEnv
I run this script on the terminal with command ./test.sh
The proxies are added into /etc/profile
but when i run env | grep proxy
, there is nothing until i run source /etc/profile
on the terminal. My terminal is using -sh
Any idea? Thanks