If you ever need to echo stuff into a file, and I'll bet you do! tee's the answer. Here's a snissle:
#echo "Acquire::http::Proxy \"$http_proxy\";" | sudo tee -a /etc/apt/apt.conf.d/70debconf
Updates the aptitude settings with the proxy server from your environment. Oh and removing it afterwards is done with:
#sudo perl -p -i -e "s/^Acquire.*$//g" /etc/apt/apt.conf.d/70debconf
Have fun ;)
No comments:
Post a Comment