title: using sed to insert file content into a file BEFORE a pattern
body: <p>I'm new to <code>sed</code>, I'm trying to insert the content of a BFile into the file AFile, BEFORE a pattern (in AFile)</p>
  
  <p>Hereafter's what I've tried :</p>
  
  <p><code>sed -i '/blah Blah/r BFile' AFile</code> : it's inserting the content of BFile AFTER the pattern in AFile.</p>
  
  <p><code>sed -i '/blah Blah/i BFile' AFile</code> : it's inserting the <strong>string</strong> 'BFile' BEFORE the pattern in AFile.</p>
  
  <p>... hmmm</p>
  
  <p>I'm conscious it's because of a wrong comprehension of regexp or <code>sed</code> : I can't understand how the <code>/i</code> and <code>/r</code> work here... I can't find any help in <code>sed --help</code></p>
  
  <p>Anyone understanding my point ?</p>
  
  <p>Regards,</p>
  
  <p>Stan</p>