I am using the following code
      ff=`date +%h" "%Oe`
      pd=`date -d'yesterday' +%h" "%Oe`
      aa=`date -d'yesterday' +%d\/%m\/%Y`
      bb=`date +%d\/%m\/%Y`
      for j in `ls -lrt |egrep "$ff|$pd"|awk -F " " '{print $9}'`
      do
      sed -n "/${aa}/,/${bb}/p" ${j} 
      done
Logs from where I am fetching the data looks something like this
      [2015-01-07 18:39:18,212] host123 WARN com.host123 .elf.UserQuest -  
      Quest/option {o.q.more.paper.osc#0} references unknown dependent   
      {t.what.form.file.more.action} in application {src-code}. Please            
      revise.
      [2015-01-07 18:39:18,212] host123 WARN com.host123 .elf.UserQuest -   
      Quest/option {o.q.more.paper.osc#1} references unknown dependent 
      {t.what.form.file.more.action} in application {src-code}. Please  
      revise.
      [2015-01-07 18:40:34,281] cessor32 ERROR com.host123 
      .email.DirectMailer -  Unable to connect to server {1.1.1.1}:
      javax.mail.MessagingException: Could not connect to SMTP host:  
      1.1.1.1, port: 25, response: 451
      at              
      com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:996)
      at  
  com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:197)
   at javax.mail.Service.connect(Service.java:233)
   at javax.mail.Service.connect(Service.java:134)
   at               
   com.host123.email.DirectMailer.deliverMessage(DirectMailer.java:191)
I am getting the following error after executing the script
   sed: -e expression #1, char 5: unknown command: `0'
Please do suggest something.
 
     
     
     
    