bash: how to delete elements from an array based on a pattern
Filtering an array is tricky if you consider possibility of elements containing spaces (not to mention even “weirder” characters). In particular answers given so far (referring to various forms of ${x[@]//pref*/}) will fail with such arrays. I have investigated this issue somewhat and found a solution however it is not a nice one-liner. But at … Read more