title: Combine arrays in the beginning of a for-loop (Bash)
body: <p>Is it possible to do something like this?</p>
  
  <pre><code>a=( 1 2 3 )
  b=( 4 5 6 )
  for num in ( ${a[@]} ${b[@]} ) # or: for num in ${( ${a[@]} ${b[@]} )[@]}
  do
      echo "$num"
  done
  # Outputs 1 2 3 4 5 6
  </code></pre>
  
  <p>I know you can combine them before and then loop through them, but is it possible in only one line?</p>
  
  <p>Current solution:</p>
  
  <pre><code>a=( 1 2 3 )
  b=( 4 5 6 )
  c=( ${a[@]} ${b[@]} )
  for num in ${c[@]}
  do
      echo "$num"
  done
  # Outputs 1 2 3 4 5 6
  </code></pre>