Skip to content
This repository
Browse code

Generic helper function.

  • Loading branch information...
commit eb660850b1103a17b8e6433beef2014a808fa2cc 1 parent 7ab8eeb
Ben Alman authored

Showing 1 changed file with 12 additions and 0 deletions. Show diff stats Hide diff stats

  1. +12 0 source/10_misc.sh
12 source/10_misc.sh
... ... @@ -0,0 +1,12 @@
  1 +# From http://stackoverflow.com/questions/370047/#370255
  2 +function path_remove() {
  3 + IFS=:
  4 + # convert it to an array
  5 + t=($PATH)
  6 + unset IFS
  7 + # perform any array operations to remove elements from the array
  8 + t=(${t[@]%%$1})
  9 + IFS=:
  10 + # output the new array
  11 + echo "${t[*]}"
  12 +}

0 comments on commit eb66085

Please sign in to comment.
Something went wrong with that request. Please try again.