title: Could sed or awk use NUL character as record separator?
body: <p>I have a NUL delimited output coming from the following command :</p>
  
  <pre><code>some commands | grep -i -c -w -Z 'some regex'
  </code></pre>
  
  <p>The output consists of records of the format :</p>
  
  <pre><code>[file name]\0[pattern count]\0
  </code></pre>
  
  <p>I want to use text manipulation tools, such as sed/awk, to change the records to the following format : </p>
  
  <pre><code>[file name]:[pattern count]\0
  </code></pre>
  
  <p>But it seems that sed/awk usually handles only records delimited by the "newline" character. I would like to know that how sed/awk could be used to achieve my purpose, or if sed/awk could not handle such case what other Linux tool should I use.</p>
  
  <p>Thanks for any suggestion.</p>
  
  <p>Lawrence</p>