Created
August 7, 2012 14:00
-
-
Save cange/3285593 to your computer and use it in GitHub Desktop.
Lists all $PATH entries and drops all duplicates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo $PATH | awk -F":" '{for (i=1;i<=NF;i++){if (x[$i]++==0) print $i}}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment