Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Generic helper function.

  • Loading branch information...
commit eb660850b1103a17b8e6433beef2014a808fa2cc 1 parent 7ab8eeb
Ben Alman authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 source/10_misc.sh
12 source/10_misc.sh
View
@@ -0,0 +1,12 @@
+# From http://stackoverflow.com/questions/370047/#370255
+function path_remove() {
+ IFS=:
+ # convert it to an array
+ t=($PATH)
+ unset IFS
+ # perform any array operations to remove elements from the array
+ t=(${t[@]%%$1})
+ IFS=:
+ # output the new array
+ echo "${t[*]}"
+}
Please sign in to comment.
Something went wrong with that request. Please try again.