The UNIX and Linux Forums  

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 -->
  #2 (permalink)  
Old 09-02-2008
bwreed bwreed is offline
Registered User
  
 

Join Date: Mar 2002
Location: Saint Paul, MN
Posts: 6
The / is being treated as the search term delimiter. Put double-quotes around the date string. Also, you don't need the *. In /28/Aug/2008:21* that really means /28/Aug/2008:2 and zero or more ones. Depending on how strict you want the match, you could use this:
print if ( m"/28/Aug/2008:21" ...
But I think you have other issues in your command.

I find that complex one-liners like this are better done first as a multi-line perl script file. Get it working, then compress it down to one line, then use it with perl -e.