title: Replace a single string in file at specific position with multiple new strings
body: <p>I want to replace a single string in a file at a specific position with some new strings. Lets say I want to search for "BAD" in a file which looks like this:</p>
  
  <pre><code>MAD
  DAD
  BAD
  DAB
  BED
  </code></pre>
  
  <p>So now I want to replace BAD at position 3 with the following:</p>
  
  <pre><code>BAD-1
  BAD-2
  BAD-3
  </code></pre>
  
  <p>The resulting file should look like that:</p>
  
  <pre><code>MAD
  DAD
  BAD-1
  BAD-2
  BAD-3
  DAB
  BED
  </code></pre>
  
  <p>I tried something with sed:</p>
  
  <pre><code>sed "s/old/new/g" 
  </code></pre>
  
  <p>But this will only changes a single line.
  Any ideas? </p>
  
  <p>Thanks and regards!</p>