Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • Doesn't respect paths with space characters and other characters which affect shell behavior (parentheses etc.) Commented Aug 14, 2022 at 8:48
  • @einpoklum - not sure what you mean as it works for me (with spaces, &c.) Commented Aug 15, 2022 at 17:03
  • Hmm... interesting. Commented Aug 15, 2022 at 19:47
  • Shouldn't it be PATH=${PATH//:$2:/:} ? otherwise prior and next elements around removed $2 from PATH are merged without : Commented Mar 21 at 14:18
  • @Fedor - yes indeed, thanks for the catch Commented Mar 22 at 17:47