title: Execute an array of string describing shell command
body: <p>I'm struggling to execute a set of command lines stored as strings in an array.
  My code looks like this :</p>
  
  <pre><code>arr=( "sudo apt-get update" "sudo apt-get install xxx" )
  ...
  arr=( ${arr[@]} "ln -s /path1 /path2" )
  etc...
  
  # Then I loop on the array of command 
  for (( i = 0 ; i &lt; ${#arr[@]} ; i++ ))
  do
       eval ${arr[$i]}
  done
  </code></pre>
  
  <p>When it loops over the array, the array is larger than the number of command stored into it. As if the blank spaces in my strings split the array in more elements
  A typical ouput is such like</p>
  
  <pre><code>usage: sudo -h | -K | -k | -L | -V
  </code></pre>
  
  <p>That means only 'sudo' is taken from within the string and I don't understand why!</p>
  
  <p>Thanks</p>