Monday, August 17, 2009
How to Fix Currupted PATH env variable in Linux or Mac
I was trying to set up system path for Groovy and ended up having the following in my .bashrc or .bash_profile file.
export PATH=%GROOVY_HOME%/bin
when i sourced this, this resulted it corrupting my terminal, i was not able to execute any command, has the this had corrupted my path and removed all the required stuff from the PATH, this is like kalidasa cutting the branch he was sitting on :)
solution - fortunately export command still works - enter this command
export PATH="/bin:/sbin:/usr/bin:/usr/sbin"
your terminal is back to life again
reference - http://hayne.net/MacDev/Notes/unixFAQ.html#executionPath
export PATH=%GROOVY_HOME%/bin
when i sourced this, this resulted it corrupting my terminal, i was not able to execute any command, has the this had corrupted my path and removed all the required stuff from the PATH, this is like kalidasa cutting the branch he was sitting on :)
solution - fortunately export command still works - enter this command
export PATH="/bin:/sbin:/usr/bin:/usr/sbin"
your terminal is back to life again
reference - http://hayne.net/MacDev/Notes/unixFAQ.html#executionPath