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