Temporarily Clearing Environment Variables
November 8th, 2009
After a long break I have some more ideas…. Will be posting them soon. For now, I leave you with a command to clear your current environment:
root@67 [~]# printenv | wc -l 26 root@67 [~]# env -i printenv | wc -l 0
This is very useful when you want to run a command ignoring any environment variables you have set. I use this command with curl nearly everyday to ignore the http_proxy environment variable I have set. Another, longer, option is:
root@67 [~]# http_proxy="" curl ....
I prefer env -i as its simpler.


November 9th, 2009 at 8:38 am
It’s good to see you back, man.
November 9th, 2009 at 9:15 am
Thanks!! I have been in India for quite some time, but I should be back to posting regularly now…
November 10th, 2009 at 1:14 pm
Nice to see you back !
Liked India ?
December 31st, 2009 at 5:03 pm
Great to see you back. I was getting sad that maybe your site was going to be defunct. I don’t understand most of this stuff but some of it has been very, very useful – and it just makes me feel joy to see such elegant and simple ways of doing things even as computers get more and more complex/confusing.
December 31st, 2009 at 5:19 pm
Thank you! I really enjoyed your comment!!
January 21st, 2010 at 5:54 pm
…
Хм …
April 19th, 2010 at 1:28 am
Никита…
значение имени калерия…
May 9th, 2010 at 1:27 pm
Вадим…
история зарубежных стран…