April 16, 2013

sudo echo??? Hey isn't that an 80 band?

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: