Shell


Temporarily Clearing Bash Environment Variables

At times I’d just like to run a script or a program without using my current or pre-existing shell environment variables. Running bash -l doesn’t really help because it just starts a new bash shell login with the same environment variables from your ~/.bashrc or profile.d system-wide settings. Well, the other day I discovered prefixing your program/script with env temporarily clears your environment variables so that your script just runs with totally no variables!