Remove duplicate paths in your PATH environment variable
This is a handy bash script to remove duplicate PATH directories but doesn't modify the order of the path already listed. Pretty cool idea.
Here is the url: remove duplicate dirs from PATH
Here is the code:
export PATH="$(echo "$PATH" | awk 'BEGIN{RS=":";}
{sub(sprintf("%c$",10),"");if(A …