Guest User

Untitled

a guest
Dec 15th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. if [ -n "$PATH" ]; then
  2. old_PATH=$PATH:; PATH=
  3. while [ -n "$old_PATH" ]; do
  4. x=${old_PATH%%:*} # the first remaining entry
  5. case $PATH: in
  6. *:"$x":*) ;; # already there
  7. *) PATH=$PATH:$x;; # not there yet
  8. esac
  9. old_PATH=${old_PATH#*:}
  10. done
  11. PATH=${PATH#:}
  12. unset old_PATH x
  13. fi
Add Comment
Please, Sign In to add comment