title: replace two consecutive lines based on a pattern and repeat through out the file
body: <p>I'm trying to replace two consecutive lines based on a pattern match, and would want this to repeat for the entire file. Here is the input file:</p>
  
  <pre><code>c aaaaa bbb
  + 0.1
  c xxxx
  c yyyy
  + 0.2
  * c gggg
  m eeeee hhhhh
  + 0.3
  </code></pre>
  
  <p>The command I tried is:</p>
  
  <pre><code>sed '/^c/{N;s/+/*+/}'
  </code></pre>
  
  <p>I expected to see a <code>*</code> prepended to each line beginning, but only those lines immediatlely following a <code>c</code> line:</p>
  
  <pre><code>c aaaaa bbb
  *+ 0.1
  c xxxx
  c yyyy
  *+ 0.2
  * c gggg
  m eeeee hhhhh
  + 0.3
  </code></pre>
  
  <p>what I actually get: </p>
  
  <pre><code>c aaaaa bbb
  *+ 0.1
  c xxxx
  c yyyy
  + 0.2
  * c gggg
  m eeeee hhhhh
  + 0.3
  </code></pre>
  
  <p>Here, i see only the first occurrence of <code>+</code> (with previous line beginning with c) is getting replaced with <code>*+</code>. The second occurrence of <code>+</code> in the file is not getting replaced. </p>
  
  <p>What am I doing wrong?  How do I get the result I want: replacement happens in multiple consecutive lines in the file?</p>