title: How to print a bash array on the same line
body: <p>I am reading in filetype data into a bash array and need to print its contents out on the same line with spaces.</p>
  
  <pre><code>#!/bin/bash
  
  filename=$1
  declare -a myArray
  
  readarray myArray &lt; $1
  
  echo "${myArray[@]}" 
  </code></pre>
  
  <p>I try this and even with the echo -n flag it still prints on newlines, what am I missing, would printf work better?</p>