title: how to read multiline input into an array in bash shell script
body: <p>Is this a correct way to read multi line input into an array in bash?</p>
  
  <pre><code>arr=( $(cat) ); 
  echo "{arr[@]}" 
  </code></pre>
  
  <p>I put this line into a script and I tried to read multiple input by hitting return key after each line but the script keeps on taking the input and does not  print the elements of the array by coming to the second line, when I press ctrl C at the input console the script terminates. Please suggest if that the correct way to read multi line input from the command line? </p>