I want to cat an apache log and then output the result to a file. I want to match the day/month with the Apache log to the current/previous date, however I seem to be doing this incorrectly.
Sample from apache log: 62.173.92.62 - - [02/Mar/2010:15:46:58 +0000] "GET /img.......
Current script:
cat access_log | grep "\[+%d+/%b" > email.log
Which I was hoping would match the [0/2Mar
part of the line, however I am getting nothing in email.log (permissions are ok).
Thanks