title: How to concatenate arrays in bash?
body: <p>I am a new to Bash. I have an array taking input from standard input. I have to concatenate itself twice. Say, I have the following elements in the array:</p>
  
  <pre><code>Namibia
  Nauru
  Nepal
  Netherlands
  NewZealand
  Nicaragua
  Niger
  Nigeria
  NorthKorea
  Norway
  </code></pre>
  
  <p>Now, The output should be:</p>
  
  <pre><code>Namibia Nauru Nepal Netherlands NewZealand Nicaragua Niger Nigeria NorthKorea Norway Namibia Nauru Nepal Netherlands NewZealand Nicaragua Niger Nigeria NorthKorea Norway
  </code></pre>
  
  <p>My code is:</p>
  
  <pre><code>countries=()
  while read -r country; do
      countries+=( "$country" )
  done
  countries=countries+countries+countries # this is the wrong way, i want to know the right way to do it
  echo "${countries[@]}"
  </code></pre>
  
  <p>Note that, I can print it thrice like the code below, but it is not my motto. I have to concatenate them in the array.</p>
  
  <pre><code>countries=()
  while read -r country; do
      countries+=( "$country" )
  done
  echo "${countries[@]} ${countries[@]} ${countries[@]}"
  </code></pre>