in reply to Re: Optimise the script
in thread Optimise the script

To elaborate, here is a c-program way of doing this
$ date -d "2 days ago" "+%e/%b/%Y" 28/Mar/2011 $ grep "28/Mar/2011" input.txt
or combine it (might not work on every shell)
$ grep `date -d "2 days ago" "+%e/%b/%Y"` input.txt