title: Read error log for a certain day
body: <p>I have a large 1GB error log called "error_log" and I need to read the errors from a certain day only. I have this simple PHP code to achieve that:</p>
  
  <pre><code>&lt;?php
  
  $lines = `cat error_log | grep '[27-Aug'`;
  echo $lines;
  
  ?&gt;
  </code></pre>
  
  <p>For some reason this code outputs nothing when I tried it. I want to read errors that were logged on day 27 August so I use <code>[27-Aug'</code> as it's the prefix for each entry.</p>
  
  <p>Is there something wrong in the above code? I'm sure of the file path as I tried the <code>head</code> command and it worked well.</p>