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*

3
  • 1
    Which shell? Your example looks like zsh. Commented May 31, 2013 at 16:30
  • 1
    array=( ${array[@]/$delete} ) works as expected in Bash. Have you simply missed the =? Commented Jan 17, 2018 at 19:56
  • 3
    @Ken, that's not quite what's wanted - it will remove any matches from each string, and leave empty strings in the array where it matches the whole string. Commented Feb 27, 2019 at 15:05