I was sent a file to run to help setup my environment to work on my companies network but after making it executable I keep running into this error regarding a curly brace and it wanting then, I have tried adding then where it says that it wants it to no avail . Here is the code I am trying to execute It would be a godsend if somebody could correct it
echo "Setting up /etc/environment with proxy settings"
if ! grep -q proxy /etc/environment;
then
echo "Setting proxy system-wide"
{
echo "http_proxy="http://proxy.cat.com:80/""
echo "https_proxy="http://proxy.cat.com:80/""
echo "ftp_proxy="http://proxy.cat.com:80/""
echo "socks_proxy="http://proxy.cat.com:80/""
echo "no_proxy=localhost,127.0.0.0/8,::1,cat.com,*.cat.com,165.26.78.0/23"
} >> /etc/environment
echo "Setting proxy for this session"
export http_proxy=http://proxy.cat.com:80/
export https_proxy=http://proxy.cat.com:80/
export ftp_proxy=http://proxy.cat.com:80/
export socks_proxy=http://proxy.cat.com:80/
else
if grep -q "https://proxy.cat.com" /etc/environment; then
echo "/etc/environment contains invalid proxy settings, please remove all proxy settings from this file and rerun this script"
echo "Execute the following command, remove all "proxy" lines, save and close: 'sudo gedit /etc/environment'"
exit 2
fi
echo "/etc/environment already configured with a proxy"
fi