title: replace one attribute on another with sed or awk
body: <pre><code> &lt;testcase classname='tc1' name='tc1' time='78.455094'/&gt;
    &lt;testcase classname='tc2' name='tc2' time='78.549320'&gt;
      &lt;failure type='fail-verdict'&gt;
        error message
      &lt;/failure&gt;
    &lt;/testcase&gt;
    &lt;testcase classname='tc3' name='tc_3' time='78.444719'/&gt;
  </code></pre>
  
  <p>how to replace 3-rd attribute <code>time</code> in testcase tag to attribute <code>status</code> (status="pass" or "failure" based on testcase; for example: tc1,tc3 - pass, tc2- fail). I tried sed: <code>sed -i 's/time=\'[0-9]+\.[0-9]+'/status="pass"/g' file.txt</code> firstly without any logic..but it doesn't work.</p>