title: Split bash string by newline characters
body: <p>I found <a href="https://stackoverflow.com/a/5257398/1197775">this</a>.</p>
  
  <p>And I am trying this:</p>
  
  <pre><code>x='some
     thing'
  
  y=(${x//\n/})
  </code></pre>
  
  <p>And I had no luck, I thought it could work with double backslash:</p>
  
  <pre><code>y=(${x//\\n/})
  </code></pre>
  
  <p>But it did not.</p>
  
  <p>To test I am not getting what I want I am doing:</p>
  
  <pre><code>echo ${y[1]}
  </code></pre>
  
  <p>Getting:</p>
  
  <pre><code>some
  thing
  </code></pre>
  
  <p>Which I want to be:</p>
  
  <pre><code>some
  </code></pre>
  
  <p>I want <code>y</code> to be an array <code>[some, thing]</code>. How can I do this?</p>