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.

8 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. nitin Says:

    Nice to see you back !

    Liked India ?

  4. 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.

  5. Brock Noland Says:

    Thank you! I really enjoyed your comment!!

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

    Хм

  7. Сидор Says:

    Никита…

    значение имени калерия

  8. Эммануил Says:

    Вадим…

    история зарубежных стран

Leave a Reply

If Wordpress eats your comment (shell output, loops, ex..) email the text to me.