Some apps just add paths to your path every time you run them. In this case, my path was over a screen full of duplicates. When adding to a path, grep is an easy check to see if it's there. But when you call something else, you don't know what you're going to get, and how many times it will put the same thing in there.
This one line script is perfect, just hard to find. Couldn't find the original author, but kudo's.
PATH="$(printf "%s" "${PATH}" | /usr/bin/awk -v RS=: -v ORS=: '!($0 in a) {a[$0]; print}')" (Change ':' to ';' for Windows.)
Greatt blog you have
ReplyDelete