Skip to content

Instantly share code, notes, and snippets.

@cange
Created August 7, 2012 14:00
Show Gist options
  • Save cange/3285593 to your computer and use it in GitHub Desktop.
Save cange/3285593 to your computer and use it in GitHub Desktop.
Lists all $PATH entries and drops all duplicates
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