title: sed replace string with condition
body: <p>I have one file contains several lines, each line has the format like</p>
  
  <pre><code>2011-07-10 condition hhh aaa: value bbb
  2011-07-10 condition ccc aaa: value bbb
  </code></pre>
  
  <p>I want to use sed to find the value string, which is between "aaa:" and "bbb", and replace to "gotit" based on the condition that the string following condition is ccc. and after sed, this file becomes</p>
  
  <pre><code>  2011-07-10 condition hhh aaa: value bbb
    2011-07-10 condition ccc aaa: gotit bbb
  </code></pre>