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.

7 Responses to “Temporarily Clearing Environment Variables”

  1. Joseph Hall Says:

    It’s good to see you back, man.

  2. Brock Noland Says:

    Thanks!! I have been in India for quite some time, but I should be back to posting regularly now…

  3. Jason Baker Says:

    I’ve been a lurking reader for a while who’s RSS subscribed to you via google reader. I’m so glad to see you will be continuing the blog, it has been a very useful blog to read. Thanks for your effort.

  4. nitin Says:

    Nice to see you back !

    Liked India ?

  5. rusl Says:

    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.

  6. Brock Noland Says:

    Thank you! I really enjoyed your comment!!

  7. Евстафий Says:

    Хм

Leave a Reply

If Wordpress eats your comment (shell output, loops, ex..) brock (at) gmail dot com.