Remove an element from a Bash array
I need to remove an element from an array in bash shell. Generally I'd simply do:
array=("${(@)array:#}")
Unfortunately the element I want to remove is a variable so I can't use the previous command. Down here an example:
array+=(pluto)
array+=(pippo)
delete=(pluto)
array( ${array[@]/$delete} ) -> but clearly doesn't work because of {}
Any idea?