title: How to grep a text file which contains some binary data?
body: <p>grep returns</p>
  
  <pre>
  Binary file test.log matches
  </pre>
  
  <p>For example</p>
  
  <pre><code>echo    "line1 re \x00\r\nline2\r\nline3 re\r\n" &gt; test.log  # in zsh
  echo -e "line1 re \x00\r\nline2\r\nline3 re\r\n" &gt; test.log  # in bash
  grep re test.log
  </code></pre>
  
  <p>I wish the result will show line1 and line3 (total two lines).    </p>
  
  <p>Is it possible to use <code>tr</code> convert the unprintable data into readable data, to let grep work again?</p>