2

Temporarily Clearing Environment Variables

http://bashcurescancer.com

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.


Read »
Created by uioloio 1 year 50 weeks ago – Made popular 1 year 50 weeks ago
Category: Tech   Tags: