The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 10-10-2008
ysprathap ysprathap is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 4
Split the access.log based on date

I am trying to get the content of Apache access.log file for the current date for viewing purposes.
I can get it with the following sed command

sed -n '/09\/Oct\/2008/,/09\/Oct\/2008/p' access.log | less

now I want to enhance it such that it will automatically take current date instead of hard coding. Any ideas will be helpful.

Thanks,
Prathap