title: Store output of grep to a variable with delimiter
body: <p>I have a file sample.txt with following text</p>
  
  <pre><code>abcde
  cde
  abcdefg
  efga
  abgd
  efghji
  </code></pre>
  
  <p>I want to search for the strings containing <code>bc</code> with <code>grep bc sample.txt</code> and get the output to a variable with a delimiter (say <code>##</code>). How can I do it? Output should look something like this.</p>
  
  <pre><code>abcde##abcdefg##
  </code></pre>