Guest User

Untitled

a guest
Jun 17th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.48 KB | None | 0 0
  1. $SearchDate = TimeFilter('%b %e %H:%M:%S');
  2.  
  3. # The date might be "Dec 09", but it needs to be "Dec  9"...
  4. #$SearchDate =~ s/ 0/  /;
  5.  
  6. if ( $Debug > 5 ) {
  7.    print STDERR "DEBUG: Inside ApplyStdDate...\n";
  8.    print STDERR "DEBUG: Looking For: " . $SearchDate . "\n";
  9. }
  10.  
  11. while (defined($ThisLine = <STDIN>)) {
  12.    if ($ThisLine =~ m/^$SearchDate /o) {
  13.       print $ThisLine;
  14.    } elsif ($ThisLine =~ m/(Mon|Tue|Wed|Thu|Fri|Sat|Sun) $SearchDate \d{4}/o) {
  15.       print $ThisLine;
  16.    }
  17. }
Add Comment
Please, Sign In to add comment